我在网站引用的程序集中有一组Web控件.我可以毫无问题地构建和运行所有内容,但是当我查看正在使用控件的aspx页面时,在Tag Prefix(标签前缀)下方会显示绿色下划线.
I have a set of web controls that are in an assembly referenced by a website. I can build and run everything without a problem, however when I look at an aspx page where the controls are being used I get a green underline beneath the Tag Prefix.
<%@ Register Assembly="MyProject.UI.ControlLibrary" Namespace="MyProject.UI.ControlLibrary.Web" TagPrefix="ControlLibrary" %> <asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" Runat="Server"> <ControlLibrary:ListView ID="List" runat="server"/> </asp:Content>因此,在此示例中,我在ControlLibrary下获得绿色下划线,当我将鼠标悬停在其上时,它显示无法识别的标记前缀或设备过滤器"ControlLibrary"
So in this example I'd get a green underline under ControlLibrary and when I hover over it it says Unrecognized Tag Prefix or Device Filter 'ControlLibrary'
代码是在Visual Studio的早期版本中编写的,我还有另一个程序集,其中也包含Web控件,并且看起来工作正常.
The code was written in a previous version of Visual Studio, I have another assembly also containing Web controls and that seems to work fine.
关于什么可能导致问题的任何想法?
Any ideas as to what could be causing the problem?
推荐答案不知道为什么行得通,但确实行得通.当我将其中一个列表视图控件的名称空间从MyProject.UI.ControlLibrary.Web更改为MyProject.UI.ControlLibrary并指向<%寄存器时,它就可以正常工作.
No idea why this works but it does. When I change namespace of one of the listview control to MyProject.UI.ControlLibrary from MyProject.UI.ControlLibrary.Web and repoint the <% register then it works fine.
更多推荐
Visual Studio 2008中无法识别的标记前缀或设备筛选器
发布评论