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
Can you explain architecture of your project ?
What is true about application service provider?
What is asp.net and ado net?
Tell me the code snippet to show how we can return 404 errors from HttpError?
What are the new login controls in asp.net 2.0?
Do session use cookies in asp net?
IN an ASP.NET Web application if there is any error, how can you debug?
What is meant by asp.net?
Is asp.net mvc front end or backend? : Asp.Net MVC
What is a global postback url?
What is the difference between custom controls and user controls?
What are query strings used for?
What are the advantages of using sql stored procedures instead of adhoc sql queries in an asp.net web application?
How to fetch a data from one table to another table in asp.net ?
What are the ways of preserving data on a Web Form in ASP.NET?