asp.net – 解决方案:在使用User控件时,元素不是vs2008中的已知元素警告

我有一个VS2008项目显示了这个警告,我无法找到任何解决方案 – 也许我的google-fu是弱的.

在任何情况下,明确的解决方案是确保TagName是控件类的名称.

所以对于我的例子,下面显示警告:

<%@ Register Src="~/path/to/Control.ascx" TagName="tagName" TagPrefix="tagprefix" %>

< tagprefix:tagName runat =“server”id =“controlID”/>

但将其更改为:

<%@ Register Src="~/path/to/Control.ascx" TagName="Control" TagPrefix="tagprefix" %>

< tagprefix:Control runat =“server”id =“controlID”/>

修复它

因人而异.

解决方法

这听起来像是经典的重新构建您的解决方案,并“关闭并重新打开Visual Studio”问题.

这可能与我在Resolving “Validation (): Element ‘xxxx’ is not supported” warning in Visual Studio 2005/2008回答的类似问题有关.

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....