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 the full form of asp.net?
What is Web API Routing?
Explain exception handling in .net.
What is the difference between session and application?
By default, Web API sends HTTP response with which of the following status code for all uncaught exception?
Where is the session stored?
What is use of Master Page in ASP.NET web pages?
How to improve performance of web application asp.net mvc? : Asp.Net MVC
What are the asp.net 2.0 features?
What methods are fired during the page load? Init()
How to implement form based authentication in asp.net application?
What is a page life cycle?
What are the best practices to follow to secure connection strings in an ASP.NET web application?
Which method is used to enforce garbage collection in .net?
What is the difference between asp.net and mvc?