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 session in asp.net?
Where code pages are used?
How do cookies work? Give an example of their abuse.
Why is xap important?
Explain how is a property designated as read-only?
in which protocol ASP.NET WEB API Work?
Can you explain the basic use of dataview?
What is application variable in asp.net?
In What Order Do The Events Of An Aspx Page Execute. As A Developer Is It Important To Undertsand These Events?
How do I force the dispose method to be called automatically, as clients can forget to call dispose method?
What is jade template engine?
What is asp.net and ado net?
What is cas?
What is difference between asp.net and asp?
What are the main requirements for caching?