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


Please Help Members By Posting Answers For Below Questions

What is the full meaning of asp.net?

524


Explain a program using code nuggets to create a simple application? : asp.net mvc

510


What are the three parts of an http response?

534


Define asp.net caching?

538


Define satellite assemblies.

586






Define session in asp.net.

561


Mention the execution process for managed code?

539


What are the security types in asp.net?

583


Explain difference between dataset and datareader?

604


What is the used of "ispostback" property?

569


How to do state management in ASP.NET?

599


What is view state management in asp net?

464


Is asp.net mvc still used? : Asp.Net MVC

513


What are the file extensions for razor views?

679


Which authentication uses a combination of windows and iis authentication?

587