Users Pricing

blog

Home Blogs ViewState in ASP.Net – MindStick

ViewState in ASP.Net

Anonymous User 4640 11 Sep 2012 Updated 18 Sep 2014

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" %>

 


I am a content writter !


Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md