Asp.Net - The dark side of ViewState

ViewState is magic
ViewState represents an ultimate effort from Microsoft on making web programmers believe they are doing Windows programming.
Client data is persistent. User interface is built using controls. Applications are server side event driven. Do not think.
ViewState effect on page content
It is contained into a hidden field. Its name is "__VIEWSTATE". Its content is visible when inspecting the html code received by a browser.
It contains:
White or black magic?
Here is an example of the impact of ViewState on a web site response time :
Still fascinated by magic ?
How to live without magic ?
How to reduce magic usage ?
If you really want to maintain ViewState on a form, disable it at page or higher level, and enable it just for the controls you want their state to be maintained.
Go to toptop