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 a uri query?

548


What do you understand by aggregate dependency?

612


How to integrate angular 8 with asp.net mvc 5? : Asp.Net MVC

494


What is the significance of attaching a profile while creating a user?

559


Describe in brief .net framework and its components.

540






How do you identify that the page is postback?

537


What is the behavior of a Web browser when it receives an invalid element?

622


Explain the features that make asp.net more used framework? : asp.net mvc

476


Can we make activex dll also ti execute in some process as that of client ? How can we do?

4246


What are html helpers in asp.net?

523


What are strong names?

582


Explain the main function of razor in asp.net? : asp.net mvc

585


Explain the main differences between asp and asp.net?

515


Are xaml file compiled or built on runtime?

553


Describe session handling in a webfarm, how does it work and what are the limits?

578