gpt4 book ai didi

asp.net - 未知服务器标签 'webopt:BundleReference'

转载 作者:行者123 更新时间:2023-12-04 05:13:05 28 4
gpt4 key购买 nike

我已经使用Visual Studio 2012 for Web Express在ASP.Net 4.5中开发了一个Web表单。它托管在somee.com上。页面加载时,出现以下错误:

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'webopt:BundleReference'.

Source Error:


Line 9: <%: Scripts.Render("~/bundles/modernizr") %>
Line 10: </asp:PlaceHolder>
Line 11: <webopt:BundleReference runat="server" Path="~/Content/css" />
Line 12: <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
Line 13: <meta name="viewport" content="width=device-width" />

Source File: /Site.Master Line: 11

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

最佳答案

您需要确保对与“webopt”文件相关的特定程序集具有引用。通常,您可以通过将其包含在web.config文件的部分中来实现此目的:

<pages>
<controls>
<add tagPrefix="webopt" assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" />
</controls>
</pages>

关于asp.net - 未知服务器标签 'webopt:BundleReference',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17130988/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com