简体   繁体   English

将usercontrol添加到aspx页面

[英]adding usercontrol to aspx page

The base class includes the field 'WebUserControl1' , but its type (common_WebUserControl) is not compatible with the type of control (ASP.common_webusercontrol_ascx) 基类包括字段'WebUserControl1' ,但其类型(common_WebUserControl)不与控件的类型兼容(ASP.common_webusercontrol_ascx)

my code: 我的代码:

<%@ Register Src="~/LoginControl.ascx" TagName="TagLogin" TagPrefix="Login" %>


<Login:TagLogin id="CtrlLoginControl" runat="server"></Login:TagLogin>

wats wrong over here. 在这里错了。 wat i need to add any more...??? 扫管笏我需要再添加...... ???

尝试将控件放在特定的命名空间中,然后asp.net不会尝试为它们生成类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM