18 May 2006

Compressing ASP.NET 2.0 ViewState

1 Comment ASP.NET

More optimized and condensed ViewState is one of the major improvements in ASP.NET 2.0. Remember those days, you have placed a paginated DataGrid on page only to discover later that huge ViewState reluctantly generated inside your page. Now in ASP.NET 2.0, you must have noticed smaller size of ViewState compare to the previous version. How about moving further to squeeze payload of page, by compressing ViewState before rendering it to page?

Here is the small tutorial on compressing ViewState in ASP.NET 2.0:
Compressing ASP.NET 2.0 ViewState

By compressing ViewState, as mentioned in test case, you can squeeze the size ViewState from 43.3 kb to 3.50 kb. Now this is the major performance improvement with no major modification in your application. All you have to do is to change base class of pages in question (like page with DataGrid, or page with lots of dynamic controls etc.) from System.Web.UI.Page to PageViewStateZip, and you are done.

written by Firoz Ansari
The author didn‘t add any Information to his profile yet.

One Response to “Compressing ASP.NET 2.0 ViewState”

  1. cool site says:

    cool site…

    check this out: http://www.aspectinformation.info/ 52…

Leave a Reply

Spam protection by WP Captcha-Free