What does the "EnableViewState" property do? Why would I
want it on or off?
Answer Posted / maloy.adhikari
When 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. The
ViewState indicates the status of the page when submitted to
the server. The status is defined through a hidden field
placed on each page with a <form runat="server"> control.
................
Maintaining the ViewState is the default setting for ASP.NET
Web Forms. If you want to NOT maintain the ViewState,
include the directive <%@ Page EnableViewState="false" %> at
the top of an .aspx page or add the attribute
EnableViewState="false" to any control.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is the full form of asp.net?
How can you implement encapsulation in asp.net?
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....
What is viewstategenerator?
How you can add an event handler?
What is a windows service?
How you can access the properties and controls of master pages from content pages?
What is difference between session and cookies?
How we implement the multiple paypal value with gridview in my website and how we make a payment through Credit Card.
What is the maximum amount of memory any single process on windows can address?
What is a web api? Which protocol is used in a web api?
How is session id generated?
Explain the Session state management options available with ASP.NET?
What is advantage of code behind coding in ASP.NET?
What is syntax code to send email from an asp.net application?