blog

Home / DeveloperSection / Blogs / ViewState in ASP.Net

ViewState in ASP.Net

Anonymous User3643 11-Sep-2012

The basic idea behind the view state feature is that when a form is submitted in ASP .NET, the form reappears in the browser window together with all form values. When we need a page variable to maintain its value across page post backs, we can use ViewState to store that value. By default ViewState property is set to True.

Disable ViewState for Specific control
<asp:TextBox ID="txtNum1" runat="server"      EnableViewState="false"></asp:TextBox>
Disable ViewState for whole page Controls
<%@ Page language="C#" EnableViewState="false" %>

 


Updated 18-Sep-2014
I am a content writter !

Leave Comment

Comments

Liked By