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

What are main return types supported in Web API?

1327


How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here.

1872


Why should i prefer JSP over asp.net or any other web development language..??

1937


How do you hide the columns?

987


How to deploy/publish webservices?How many ways?Plz explain me

2232


What are custom controls?

883


How you can return View from ASP.NET Web API method?

981


What symbol specifies the beginning of a query string?

877


What is autopostback in asp net?

987


What is an example of an application service provider?

821


Which protocol is used to call a web service?

1001


Which is faster union or union all?

940


Explain asp.net application life cycle?

945


What are Authentication and Authorization?

1054


What is server transfer?

844