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 is Difference between Production Serves and Development Servers? And Suppose, m adding/deleting C# file in a project based on the Specific Requirement. These Files are Automatically updated in Production Servers? So Which tool is needed to do This One?

2056


How can I configure asp.net applications that are running on a remote machine?

1059


What is the adavantage of using ASP.NET routing?

1175


What is asp.net web pages?

988


Is it possible to migrate visual interdev design-time controls to asp.net?

1053


In a Repeater control how one can provide an alternating color scheme ?

1081


What is the mvc framework?

1010


How to create discussion forum in asp.net mvc? : Asp.Net MVC

1049


How to turn off cookies for a page?

986


Where would you use an ihttpmodule, and what are the limitations if any?

1022


when a request is made in Life cycle of ASP.NET page .

963


Explain the asp.net mvc request life cycle? : asp.net mvc

1018


In ViewState How much lifespan items stored?

1077


What is the difference between session.abandon() vs clear()?

983


What is the file through which you can customize your asp.net application?

1103