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 can you send an email message from an asp.net web page?
What are the advantages and limitations of query string?
What are the various ways to send content from one page to another?
i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?
What are the file extensions for razor views?
What is the life cycle of an asp.net page?
What describes a query?
What are validator? Name the validation controls in asp.net? How do you disable them? Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?
What is rich control in asp.net?
Can you explain how ASP.NET application life cycle and page life cycle events fire?
How does asp.net work?
What is a web api endpoint?
How long do session variables last?
How can we inherit a static member?