Nigel Whitworth's Development Site

You are currently not logged in.

What is the Viewstate?

In ASP, if you wanted to preserve the values of controls on a form between page loads, you had to programmatically do this. In ASP.NET, a new technique has been developed called the ViewState. This is a hidden field that contains information about the values of each control as they had existed in the page creation/reload. If the viewstate differs from what has been submitted, the relevent event gets fired. Each control on the form has a property called EnableViewState which is set to true automatically. This value can be set to false but its value will not be stored in the ViewState and you will have to programmatically deal with it. The length of a viewstate depends on how many controls there are on a form. When you view the source code of a ASPX page in the browser, don't expect to see anything meaningful to the human eye in the viewstate as its not designed for the human. The viewstate appears in all forms of ASP.NET whether it be generated in VB.NET or C#


If you intend to vote or make a comment, please enter the security code.

Make a comment

*Comments are the views of individuals, they may or may not be correct.
All comments are reviewed and accepted or rejected.
If you give an email address, you will be sent an email when someone makes a comment on this page.*

Name :
Email :
Comments :


Only name and Code is compulsory.
 
 
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)