System.Web.UI.Page.RegisterRequiresControlState Method

Registers a control as one whose control state must be persisted.

Syntax

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
public void RegisterRequiresControlState (Control control)

Parameters

control
The control to register.

Remarks

Custom server controls that use control state must call the Page.RegisterRequiresControlState(Control) method on each request because registration for control state is not carried over from request to request during a postback event. It is recommended that registration occur in the Control.Init event.

Requirements

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