What is viewstate?

Answer Posted / nizath ali.u

Hi all this is Nizath Ali,

Viewstate is a client side state management.It
retains the page & control specific values between the
round trips(Post Back).
It always stores the values in one hidden form field
(control of ASP.NET) on the pge.

Brief:
Each webform page & controls on the page consists
of one "viewstate" property.
If we enable the viewstat property as true, it
automatically save the page & control specific values b/w
the round trips.
This viewstate is implemented with one hiddenform
field(control of ASP.NET) called "_VIEW STATE".That is the
viewstate stores the values in this hiddenform field
control.
This hidden form field is automatically created in
every webform page.
Now, what are the values stored in a viewstate
property,that are collected & formatted into a single
encoded string.
Then the encoded string is assigned to the "value"
property of the hiddenform field "_VIEW STATE".
Then it send to the client as apart of the webpage.
This kind of process is done by viewstate.

Drawback:
When we store the large values on the viewstae,it
makes the page slow down.
It stores the values on the "hiddenform field" so
no good security is their.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which .NET framework supports Web API?

592


Describe the sequence of action takes place on the server when ASP.NET application starts first time?

622


How can I have a particular web page in an asp.net application which displays its own error page?

523


What are the advantages of asp.net?

541


Can you change a master page dynamically at runtime? How?

501






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

499


How can you apply a theme to your asp.net application?

535


How do we sort the data from a dataset?

573


Define static member?

533


Differentiate between globalization and localization.

537


Do you know caching feature?

564


How do I create a web form?

530


Describe how passport authentication works.

568


What is asp.net with mvc? : Asp.Net MVC

520


What is server components?

538