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
Define repository pattern in asp.net mvc? : asp.net mvc
What is the file extension of web service?
What are the advantages of asp.net mvc framework? : asp.net mvc
What is the difference between client-side and server-side validations in webpages?
How do you use viewstate?
What is http session state?
How can we identify that the Page is Post Back?
What is the difference between c# and .net?
8. Why do you want to work here?
What is the part of url?
Explain the difference between page.registerclientscriptblock and page.registerstartupscript?
What are demand-paging and pre-paging?
Why do I get error message "could not load type" whenever I browse to my asp.net web site?
What are the new login controls in asp.net 2.0?
What is a master page and what does it do?