create a server control (similiar code like the follows)
[ToolboxData("<{0}:WelcomeCompositeControl id=\"a1\" runat=server></{0}:WelcomeCompositeControl>")]
public class WelcomeCompositeControl : System.Web.UI.WebControls.WebControl, INamingContainer
{
...
}
open one aspx page , and set it at design mode
, we drag the custom server control to the page
then the control generated automaticly, the generated code as follows:
<cc:WelcomeCompositeControl ID="a1" runat="server" />
but when we set the aspx page at source mode
, and drag the custom server control to the page ,
the generated code as follows:
<cc:WelcomeCompositeControl ID="WelcomeCompositeControl1" runat="server" />
I do not know what's wrong with my code , I want the generated code should the same.
env.
Windows 7 64bit sp1
Visual Studio 2010 (10.0.40219.1 SP1Rel)
Microsoft.NET Framework Version 4.0.30319 SP1Rel