System.Web.UI.Page.EnableViewState Property

Gets or sets a value indicating whether the page maintains its view state, and the view state of any server controls it contains, when the current page request ends.

Syntax

[System.ComponentModel.Browsable(false)]
public override bool EnableViewState { set; get; }

Value

a bool

Remarks

For information about why you might want to disable view state, see Control.EnableViewState.

Even if Page.EnableViewState is false, the page might contain a hidden view state field that is used by ASP.NET to detect a postback.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0