What does the "EnableViewState" property do? Why would I
want it on or off?
Answer Posted / kumar saurabh
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, since you will wipe out any re-populated data in any case. 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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is form submit?
What is the use of session state and application state and difference between them?
What is base class of .net?
What is the difference between a candidate key and primary key?
Is it possible to migrate visual interdev design-time controls to asp.net?
What do you mean by role-based security?
What are httphandlers and httpmodules and difference between them?
What is the base class from which web forms are inherited?
What are the built-in objects in asp.net?
What is the default timeout for a cookie?
how to include timer or counting time to display next page in asp.net
What are the advantages of passport authentication?
Write a code for passing ArrayList in Web API?
Which protocol is used in a web api?
Can I tap into other windows livetm services?