Thursday, August 13, 2009

Removing surrounding <span> from a WebControl

See the comment section of this post:
Use a different constructor:
public MyControl() : base()
{}
Can also pick a different tag instead of span:
public MyControl() : base(HtmlTextwriterTag.Div)
{}
Update: Unfortunately, setting it to HtmlTextwriterTag.Div causes a table tag to be rendered for Firefox. See this post about adaptive rendering.

No comments:

Post a Comment