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 is view state and its use

Answer Posted / rashmi thakur

ViewState is a built-in structure for automatically
retaining values among multiple requests for the same page.
The view state is internally maintained as a hidden field
on the page but is hashed, providing greater security than
developer-implemented hidden fields do.
Following are the benefits of using ViewState:-
&#61692; No server resources are required because state is
contained in a structure in the page code.
&#61692; Simplicity.
&#61692; States are retained automatically.
&#61692; The values in view state are hashed, compressed,
and encoded, thus representing a higher state of security
than hidden fields.
&#61692; ViewState is good for caching data in Web farm
configurations because the data is cached on the client.
Following are limitation of using ViewState:-
&#61692; Page loading and posting performance decreases when
large values are stored because
&#61692; View state is stored in the page.
&#61692; Although view state stores data in a hashed format,
it can still be tampered with because it is stored in a
hidden field on the page. The information in the hidden
field can also be seen if the page output source is viewed
directly, creating a potential security risk.
&#61692; If page get destroyed or refresh information which
is stored in view state gets vanished.

Below is sample of storing values in view state.
this.ViewState["EnterTime"] = DateTime.Now.ToString();

Is This Answer Correct ?    11 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main requirements for caching?

987


Is sql backend or frontend?

964


Explain asp.net application life cycle?

942


How would you create a permanent cookie?

981


What are the Types of object in asp

1072


How do I know asp.net mvc version? : Asp.Net MVC

977


how can create login from create and written conde in asp.net

2356


What are the different kinds of assemblies?

893


Can we handle the error and redirect to some pages using web.config?

1549


Explain the difference between sql invalidation and sql notification.

926


How can you register a custom server control to a web page?

942


What is the procedure to handle the process request using mhpm events fired? : asp.net mvc

999


How can you identify that the page is post back?

949


Do you know using sql cache invalidation?

966


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

1935