Saturday, December 15, 2007

EnableViewState

Automatic state management is a feature of ASP.Net that enables server controls to re-populate their values on a round trip.
The state of a control is passed to and from the server in a hidden form field.
ViewState is enabled for all server controls by default.To disable set the EnableViewState property of the control to false.
For eg.

When you do not post back from a page then to achieve better performance you can turn off ViewState at the page level.

<%@ Page EnableViewState="false" %>

No comments: