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 webresource axd?
what are the Custom controls in asp.net?
Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?
What is difference between Server.Transfer and Response.Redirect in ASP.NET?
0 Answers Sans Pareil IT Services,
What is difference between machine.config and Web.Config?
4 Answers Accenture, BirlaSoft, Le Logiciel,
What are the various ways of securing a web site that could prevent from hacking etc ?
What is HTTPContext and HTTPModule. What is the use of them?
What are the options in ASP.NET to maintain state?
What r all the controls in ASP.NET ?
Which is the best institute for ASP.NET?
8 Answers ABC Infotech, Tech Mahindra,
What can we do with asp.net?
In which situation can you not use a viewstate?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)