Monday, August 9, 2010

The Importance of View State

The Importance of View State:


View state is a mechanism used by ASP.NET to store user-specific request and response data between page requests. The data being stored is typically associated with the server controls. This data is referred to as control state. Again, the view state data is not stored by the server. Instead, it is saved into the page’s view state (stage 7, rendering) and sent in the page’s response back to the user. When the user makes the next request, the view state is returned with his or her request. When the page processes, ASP.NET pulls the view state from the page and uses it to reset property values of the page and its controls (stage 4, load). This allows ASP.NET to have all the object data between requests without having to store it on the server. The result is a more scalable Web server that can handle more requests.

No comments: