Export (0) Print
Expand All

How to: Convert HTML Server Controls to HTML Elements (Visual Studio) 

If you no longer need to program an HTML server control in server code, you should convert it back to a plain HTML element. Each HTML server control in a page uses resources, so it is a good practice to minimize the number of controls that the ASP.NET page has to work with.

To convert an HTML server control to an HTML element

  • In Design view, right-click the control and clear the check mark next to Run As Server Control.

    -or-

  • In Source view, remove the runat="server" attribute from the control's tag.

    You do not have to remove the ID attribute. Be especially careful not to remove the ID attribute if there is client script that references the element.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft