When to use runat="server" on normal HTML

Viewed 40045

Is it ever appropriate to use runat="server" on a standard HTML element instead of a true ASP.NET control? I have full control over setting the html/text of the normal element, so why wouldn't I use it instead of a "clunky" ASP.NET WebForms control?

If one is better than the other, some points of interest I would like to know:

  • Performance differences
  • Functionality differences
  • Other differences not so obvious?

An example difference:

<asp:Literal ID="mySpecialHtml" runat="server" />

<div id="mySpecialHtml" runat="server" />
5 Answers
Related