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


Please Help Members By Posting Answers For Below Questions

What is query string with example?

602


How to handle errors in Web API?

735


What is asp.net response object?

643


Tell me what is the request flow used for asp.net mvc framework? : asp.net mvc

635


What is postback request?

635






In Code-Behind class which kind of code (server or client) is found ?

680


Define transparent caching with aop?

622


What is microsoft windows sharepoint services?

636


What are client activated objects and server activated objects?

607


Is redux flux?

614


Is session server side or client side?

617


What is form submit?

611


What role “#&&” plays in a querysting?

642


How many types of sessions in asp.net?

679


Explain the different types of assemblies?

626