What does the "EnableViewState" property do? Why would I
want it on or off?
Answers were Sorted based on User's Feedback
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 |
Answer / 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 |
What is considered a service provider?
How do we invoke queries from the application?
Types of object in asp ?
How can you change a Master page dynamically in which event of page life cycle?
What are the contents of cookie?
How Session use Cookies in State Management?
Why mvc is faster than asp.net? : Asp.Net MVC
How do you handle session management in ASP.NET and How do you implement them. How do you handle in case of SQLServer mode?
What is the difference between pathparam and queryparam?
What are the various session state management options provided by asp.net?
If there is submit button in a from tell us the sequence what happens if submit is clicked and in form action is specified as some other page ?
Which protocol is used in a web api?