Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Web Server Controls
Getting Started
 How to: Convert HTML Server Control...
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Web Developer 
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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker