HtmlGenericControl ID Property is not specified – ASP.Net (Visual Studio)
Posted on 18. May, 2009 by khader in Other
You would see this quite often in Visual Studio (mainly 2008) while working with ASP.Net and User Controls. This is been very tricky. It is not actually a problem, but Visiual Studio could not render this control inside another page. It was kind of a pain not being able to see User control inside main pages. It took a while to figure it out.
If you are using HtmlGeneric controls (such as <body>, <div>, <span>, <p>, <link> etc) in your User Control they must have ‘ID’ attribute defined though you are not using it.
For example we had
<link href="~/App_Themes/Default/Default.css" runat="server" rel="stylesheet" type="text/css" />
All I need to do was add ‘id’ attribute to this tag as
<link href="~/App_Themes/Default/Default.css" runat="server" rel="stylesheet" type="text/css" id="dummy"/>
Cheers!

Guy BAMI
05. May, 2010
Hi, very funny hint….
but useful…
Guy Bami W.
Rad
07. Sep, 2010
nice hint buddy…
It addressed my problem.