Share via


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.

 

Thanks
Deepak Verma
SDET | Visual Web Developer

Comments

  • Anonymous
    November 09, 2008
    PingBack from http://www.tmao.info/tip-22-did-you-know%e2%80%a6how-to-improve-performance-of-page-and-server-control-processing/

  • Anonymous
    November 10, 2008
    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.

  • Anonymous
    November 13, 2008
    The comment has been removed

  • Anonymous
    November 20, 2008
    gud article keep it up. kumar http://vbprojecta.co.nr

  • Anonymous
    November 23, 2008
    Good artilce.Plz Add some more tips as well in the upcoming issues.

  • Anonymous
    December 23, 2008
    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.