Flesk.ViewStateOptimizer_NET20

I came across this excellent looking tool Flesk ViewState Optimizer but was not able to find any details or documentation on it.  Apparently the tool used to be commercial but now its free!  I was able to dig up some history on it

Flesk.ViewStateOptimizer is a unique technology that overrides sending ViewState object to your client’s browser! This means that your client’s browser will no longer receive those large hidden field values, which thus reducing downloading time. Instead, Flesk.ViewStateOptimizer saves the page’s Viewstate hidden field to a file, on the server side, speeding up processing time, downloading time and data.

Combining Flesk.ViewStateOptimizer and Flesk.Accelerator,
you can benefit from reducing downloading data and downloading time up to 30 times faster! No other components
do the same or give the same results!

Flesk.Accelerator and Flesk.ViewStateOptimizer are now released with versions
targeted for the .NET Framework v2.0

 

How it works?

Flesk.ViewStateOptimizer has several viewstate optimization possibilities that can be set through the web.config file.
From viewstate data compression to saving viewstate on server farms, anything can be possible. This means that Flesk.ViewStateOptimizer can persist values using server side Sessions or files saved on shared locaton accessible by a server farm, or by using common viewstate hidden field value on client side, with the ability to compress data.

There are 2 ways to setup Flesk.ViewStateOptimizer on your web application or .Net project:

  1. In all your codebehind, instead of inheriting your class with
    System.Web.UI.Page, change the inheritance to Flesk.Accelerator.Page.
    If you use script block codebehind, use the following lines:

    <%@ Page  Language="C#" Inherits="Flesk.Accelerator.Page" %>
    
  2. Flesk.ViewStateOptimizer is designed to meet the requirements of customers that are unable to change
    the base class of their pages.
    As such, Flesk.ViewStateOptimizer provides static methods that allows calling the viewstate procedures
    from within any page class.

    If you have access to the source of your base class, just add the following lines to the code:

    													
    protected override void  SavePageStateToPersistenceMedium(object viewStateBag)
    {
       Flesk.Accelerator.Page.SavePageStateToPersistenceMedium(this, viewStateBag);
    }
    
    protected override object LoadPageStateFromPersistenceMedium()
    {
        return Flesk.Accelerator.Page.LoadPageStateFromPersistenceMedium(this);
    }
    

    If you are using precompiled code you’ll have to edit your aspx files. If at all possible, add the following

    snippet to your aspx file:

    protected override PageStatePersister PageStatePersister
    {
      get
      {
        return Flesk.Accelerator.Page.GetPageStatePersister(this);
      }
    }