Tip #22: Did you know…How to improve performance of Page and Server Control Processing?

  1. Avoid unnecessary round trips to the server – You can use ASP.NET Ajax and partial page rendering.

    ASP.NET Ajax – ASP.NET  Ajax allows the developer to create web application in ASP.NET which can update data on the web page without a complete reload of the page.

    Partial Page Rendering – Partial-page rendering relies on server controls in ASP.NET and on client functions in the Microsoft AJAX Library. You do not have to use the Microsoft AJAX Library to enable partial-page rendering, because this functionality is provided automatically when you use the ASP.NET AJAX server controls. However, you can use the APIs exposed in the client library for additional AJAX functionality. ASP.NET enables you to add partial-page rendering to new or existing ASP.NET Web pages without writing client script.

    To get more information, see partial page rendering overview and  ASP.Net Ajax.
  2. Use the Page object’s IsPostBack property to avoid unnecessary processing
  3. Leave buffering on unless you have a specific reason to turn it off

Please take a look at Chapter 6 – Improving ASP.NET performance to learn more about best practices.


Deepak Verma
SDET | Visual Web Developer

Comments (6)

  1. How exactly does number one help?  AJAX tends to lead to a more chatty interface, thus more server side load.  Keep in mind that the whole page is sent back with partial page rendering.

  2. Latest on Tips and Tricks Blog. Tip #13: Did you know… How to get the browser agent using ASP.NET Ajax

  3. naresh singh dhami says:

    Good artilce.Plz Add some more tips as well in the upcoming issues.

  4. SteveO says:

    I don not agree with the premise of your article.  AJAX is not at all as quiet and clean as you state.  It is just a FAKE on the presentation in the client.  It still does the round trip and the new HTML / XML is sent back.  

    AJAX just soothes out the page change visual notification.