Wednesday, November 9, 2011

How to Completely Disable Viewstate in ASP.NET

I tried to disable Viewstate of a website by set EnableViewState Page directive to false.
But when I get the Page HTML Source I found the following line:

 <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
 value="/wEPDwUKMTY1NDU2MTA1MmRk7eWz8DBE7zF7MW8sS4wNndKCr5gBJPZZ/LOS1KIbBo4=" /> 

  protected override void SavePageStateToPersistenceMedium(object viewState)

  protected override object LoadPageStateFromPersistenceMedium()
    return null;

Hire Me

Follow me on Facebook

Follow me

Do you find this Blog helpful?

Follow by Email

About Me

My Photo
Expert Senior Software Developer

Microsoft Business Card