|
In classic ASP,when a form is submitted , all form values are
cleared. Suppose you have submitted a form with a lot of
information and the server comes back with an error and you will
have to go back to the form and correct the information. You
click the back button, and what happens.......ALL form values
are CLEARED, and you will have to start all over again! and the site
did not maintain your ViewState.
Whenever a form is submitted in
ASP .NET, the form reappears in the browser window together with
all form values. How come? This is because ASP .NET maintains
your ViewState and the ViewState indicates the status of the page
when submitted to the server.With a <form runat="server">
control,the status is defined through a hidden field placed on each page. The source code could look something like this:
|