I remember reading Wroxer Alex Homer over two years ago saying something to the effect “to make any html element a smart asp.net control, just add an ID=”XXX” and a RUNAT=SERVER tag.” That stuck with me and here, two years later, I put it to use.
I wanted to hide a <li> line item based on a certain condition. There is no system.web.ui.htmlcontrols.li class, so I added ID=liitem runat=server in the .ascx to see where it would lead. In the codebehind I declared a generic control
protected System.Web.UI.HtmlControls.HtmlGenericControl liitem;
which gave me the ability to liitem.visible = false it.
Those asp.net designers.... They thought of everything.