ASP.NET 2.0 Performance Inspection Questions - Server Controls

From Guidance Share

Jump to: navigation, search

- J.D. Meier, Srinath Vasireddy, Ashish Babbar, Rico Mariani, and Alex Mackman


Do you use server controls when you do not need to?

Evaluate your use of server controls to determine if you can replace them with lightweight HTML controls or possibly static text. You might be able to replace a server control under the following conditions:

The data being displayed in the control is static, for example, a label.

  • You do not need programmatic access to the control on the server side.
  • The control is displaying read-only data.
  • The control is not needed during post back processing.


Do you have deep hierarchies of server controls?

Deeply nested hierarchies of server controls compound the cost of building the control tree. Consider rendering the content yourself by using Response.Write or building a custom control which does the rendering. To determine the number of controls and to see the control hierarchy, enable tracing for the page.


Related Items

For more information about the questions and issues raised in this section, see ASP.NET 2.0 Performance Guidelines - Server Controls.

Personal tools