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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use sessions?

982


Explain server side state management system.

944


What is the difference between page-level caching and fragment caching?

960


Write a code snippet to implement the indentation in json in web api.

1046


What are the disadvantages of asp.net?

1071


How do I create a web form?

1019


can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?

2122


Differentiate between globalization and localization.

965


What are cookies in asp.net?

1054


Explain what does wsdl stand for?

1111


Are cookies stored on server or client?

945


What are the different method of navigation in asp.net?

1015


What is synchronous and Asynchronous post back ?

1101


When using the Pager object, inorder to know which page to go, which property you have to set to grid?

1009


Which object encapsulates state or data of a user?

1054