Visual Studio 2008中无法识别的标记前缀或设备筛选器

编程入门 行业动态 更新时间:2024-10-28 22:24:01
本文介绍了Visual Studio 2008中无法识别的标记前缀或设备筛选器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在网站引用的程序集中有一组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中无法识别的标记前缀或设备筛选器

本文发布于:2023-11-09 15:27:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572729.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:前缀   标记   无法识别   设备   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!