What is EnabledViewState at Page level and control level in c#.

Posted by Jitendrasoft09 under C# on 3/28/2013 | Points: 10 | Views : 1122 | Status : [Member] [MVP] | Replies : 1
Suppose if EnabledViewState is true or false in the web page and control of the page, how works it on page level and control level.

Jitendra Kumar
If my post helps you, plz mark as an answer.



Responses

Posted by: Mohansubramanian on: 3/28/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

ViewState value is temporarily saved in the client's browser.ViewState can be disabled for a single control, for an entire page orfor an entire web application.

The syntax is:

Disable ViewState for control (Datagrid in this example)
< asp:datagrid EnableViewState="false" ... / >

Disable ViewState for a page, using Page directive
< %@ Page EnableViewState="False" ... % >

Disable ViewState for application through entry in web.config
< Pages EnableViewState="false" ... / >

Regards,
Mohan Subramanian
powerofmicrosoft.blogspot.in

Regards,
Mohan Subramanian
http://mohanks.com

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response