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
How many types of Cookies are available in ASP.NET?
How does the cookies work in asp.net?
What are strong names?
code for "For every 5days system has to create 1text file with the corresponding date and it has to store in c-drive" by using web applications
What is voluum?
What is application variable in asp.net?
Explain why it is useful to use mvc instead of webforms? : asp.net mvc
What are client activated objects and server activated objects?
Is data edited in the Repeater control?
Why is the standalone environment only useful during the development process?
What is new asp.net core?
Explain the difference between overriding and overloading?
What is difference between abstract class and an interface?
How is the asp.net mvc architecture different from others? : asp.net mvc
How can we create a website?