System.Web.UI.Page.RequiresControlState Method

Determines whether the specified System.Web.UI.Control object is registered to participate in control state management.

Syntax

public bool RequiresControlState (Control control)

Parameters

control
The System.Web.UI.Control to check for a control state requirement.

Returns

true if the specified System.Web.UI.Control requires control state; otherwise, false

Remarks

Control state is an object composed of critical view-state data that Web server controls need to function; it is contained in a separate object from normal view state.

Custom controls using control state must call the Page.RegisterRequiresControlState(Control) method before saving control state. Use the Page.RequiresControlState(Control) method to check for controls that are registered with the page as requiring control state.

Requirements

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