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


Please Help Members By Posting Answers For Below Questions

Define common type system?

564


Who is using asp.net?

488


What is asp.net web pages?

502


What is the parent class of all the web server control?

464


Can a .net web application consume java web service?

491






What are sessions used for?

526


Explain difference between friend and protected friend?

504


What are the benefits of view state?

528


Explain Apache web servers ? How can you get ASP.NET running in Apache web servers - why should you do this?

491


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1580


What is the part of url?

511


What is http protocol and how it works?

507


How does the iis work?

524


Is asp.net easy to learn?

529


What does asp.net stand for?

515