What does the "EnableViewState" property do? Why would I
want it on or off?
Answer Posted / swapna
Enable ViewState turns on the automatic state management
feature that enables server controls to re-populate their
values on a round trip without requiring you to write any
code.
This feature is not free however, since the state of a
control is passed to and from the server in a hidden form
field.
You should be aware of when ViewState is helping you and
when it is not. For example, if you are binding a control
to data on every round trip, then you do not need the
control to maintain it's view state.
ViewState is enabled for all server controls by default. To
disable it, set the EnableViewState property of the control
to false.
Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Which method is used to force all the validation controls to run?
How to find last error which occurred?
Which two new properties are added in asp.net 4.0 page class?
Explain the difference between codebehind="mycode.aspx.cs" and src="mycode.aspx.cs"?
Write a code snippet to implement the indentation in json in web api.
What is application state?
What are the three parts of an http response?
When was asp.net released?
What is base class of .net?
Define page output caching?
Which is the parent class of the web server control?
How would you turn off cookies on a page of a website?
What is the difference between page directive include and action tag include?
How can we create pie chart in asp.net?
Is it right that ASP.NET Web API has replaced WCF?