what is view state and its use
Answer Posted / namrata
In simple words........
(1)if you are not using viewstate: When a form is submitted
in ASP,all form values are cleared(get lost). For
example,If you submit a web form with lots of details and
the server comes back with an error.You will have to go
back to the form and correct the detail. Then You click the
back button to that same form, you will find that all form
values are CLEARED and you will have to start all over
again!
(2)if you are using viewstate: When a form is submitted in
ASP .NET, the form reappears in the browser window together
with all form values. This is because ASP .NET maintains
your ViewState. The ViewState indicates the status of the
page with all the values of controls on it when submitted
to the server.
| Is This Answer Correct ? | 13 Yes | 3 No |
Post New Answer View All Answers
Explain Session state management options in ASP.NET.
Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?
What is autopostback in dropdownlist in asp net?
Out of ASP or ASP.NET which one is stateless?
What is simple data binding?
How long should a session id be?
Is asp.net and .net the same?
What kind of data can be stored in viewstate?
what cut off mark for po's,what questions they asked for interview?
What are the namespaces used in asp.net mvc? : asp.net mvc
When you use Ajax controls in the ASP.NET application?
What is custom attribute?
Will the asp.net validators run in server side or client side?
What is the difference between asp.net mvc and asp.net webforms? : asp.net mvc
What is the use of global.asax file?