编译器错误信息: BC30560: “CustomControl”在命名空间“XXX.WebControls”中不明确。
代码如下:
Namespace XXX
Namespace WebControls
<DefaultProperty("Value"), ToolboxData("<{0}:CustomControl runat=server></{0}:CustomControl>")> Public Class CustomControl
Inherits System.Web.UI.WebControls.WebControl : Implements INamingContainer Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
writer.Write("My test")
End Sub
End Class
End Namespace
End Namespace
请大家指点交流一下,共同探讨一下做WebControl的心得
代码如下:
Namespace XXX
Namespace WebControls
<DefaultProperty("Value"), ToolboxData("<{0}:CustomControl runat=server></{0}:CustomControl>")> Public Class CustomControl
Inherits System.Web.UI.WebControls.WebControl : Implements INamingContainer Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
writer.Write("My test")
End Sub
End Class
End Namespace
End Namespace
请大家指点交流一下,共同探讨一下做WebControl的心得
去掉,CustomControl有重名了
<%@ Register TagPrefix="ann" Namespace="MySoft.WebControls" Assembly="MySoft.WebConctrols.Annunciator" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<FONT face="宋体">
<Ann:Annunciator id="Annunciator3" style="Z-INDEX: 101; LEFT: 240px; POSITION: absolute; TOP: 56px"
runat="server" Width="144px" Height="56px"></Ann:Annunciator></FONT>
</form>
</body>
</HTML>将html代码贴出来,帮忙看看哪里的问题
<Ann:Annunciator id="Annunciator3" style="Z-INDEX: 101; LEFT: 240px; POSITION: absolute; TOP: 56px"
总是提示这一句有错误