What does the "EnableViewState" property do? Why would I
want it on or off?
Answers were Sorted based on User's Feedback
Answer / ganesh
It allows the page to save the users input on a form across
postbacks. It saves the server-side values for a given
control into ViewState, which is stored as a hidden value on
the page before sending the page to the clients browser.
When the page is posted back to the server the server
control is recreated with the state stored in viewstate.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / sudhir kunnure
Enableviewstate propery is on for page or any control then
it holding or catching or storing data in memory as well as
client side hedden value. when u post back data remains in
control or page.
if Enableviewstate property false then data remove when
post back.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / satish v itagi
Web page is a stateless entity. To preserve data between
postbacks dot net provided to containers viz. ViewState and
Session.
Viewstate enables persistence of data across post backs in
web forms of dot net (web pages). The data is stored in
hidden field/s of the page. Hence data travels across
media between server and client making loading and un-
loading slow. The advantage is every page will have its
own viewstate data. Normally web controls will have
viewstate enabled. If viewstate is turned off, other data
also can be saved in viewstate.
Objects have to be serialised before putting in viewstate.
While accessing methods and properties of an object the
object has to be properly type casted.
At times, viewstate of a page can get corrupted, requiring
the whole application to be re-started. It is not good
idea to keep large objects in viewstate.
If performance is the issue turn off viewstate, if
persistence is the issue and you have small to medium sized
data enable viewstate.
Keeping state in Sessions is also a better solution.
| Is This Answer Correct ? | 3 Yes | 0 No |
Is It Possible for Static Variables access normal variable? and Normal Varialbe Access the static Variables?
1 Answers Phoenix Technologies,
what is narmalization
Can you clarified A Web service can only be written in .NET or not?
What line in the following XML document will generate an error? <?xml version=?1.0?> <employees> <employee> <name>Bob Andcarrol</name> </employee> <employee> <name>Robert Burns</name> </employee> </employees> a) 6 b) 4 c) 1 d) There is no error
How can you access the properties and controls of master pages from content pages?
What is the purpose of App_Code folder in ASP.NET? Why we this?
0 Answers Sans Pareil IT Services,
What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
I have a component with 3 parameter and deployed to client side now i changed my dll method which takes 4 parameter.How can i deploy this without affecting the clent?s code ?
1 Answers Microsoft, Satyam, Wipro,
What is virtual directory in asp.net?
What is the difference between Session and response.Redirect?
Will the asp.net validators run in server side or client side?
What is the difference between exe and dll?
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)