Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What does the "EnableViewState" property do? Why would I
want it on or off?

Answers were Sorted based on User's Feedback



What does the "EnableViewState" property do? Why would I want it on or off?..

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

What does the "EnableViewState" property do? Why would I want it on or off?..

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

What does the "EnableViewState" property do? Why would I want it on or off?..

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

Post New Answer

More ASP.NET Interview Questions

Does web services support data reader like pom project?

0 Answers  


How many types of controls are there in asp.net?

0 Answers  


Define the steps to set up validation control.

0 Answers  


What is the difference between session and application?

0 Answers  


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

0 Answers   webdirekt,


Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?

0 Answers  


What is OSI layer? Explain different layers.

0 Answers   MCN Solutions,


what is code access security,role based security explain with example

1 Answers   Infosys,


What are the various types of validation controls provided by asp.net?

0 Answers  


What is a DLL Hell Problem in .Net?

12 Answers  


When Garbage Collector will run and how its identifing whether the Object is used or Not.?

2 Answers   Verizon,


What base class do all Web Forms inherit from?

2 Answers   Siebel Systems,


Categories