Edit

Bagikan melalui


ChangePassword.SaveControlState Method

Definition

Saves any server control state changes that have occurred since the time the page was posted back to the server.

protected public:
 override System::Object ^ SaveControlState();
protected internal override object SaveControlState ();
override this.SaveControlState : unit -> obj
Protected Friend Overrides Function SaveControlState () As Object

Returns

The server control's current state; otherwise, null.

Remarks

Use the SaveControlState method to save state information required for the operation of the ChangePassword control. This control state data is stored separately from the view state data for the ChangePassword control.

Custom controls using control state must call the RegisterRequiresControlState method on the Page object before saving control state.

Notes to Inheritors

When control state is saved, a string object is returned to the client as a variable that is stored in an HTML <input type="hidden" /> element. Override the SaveControlState() method to extract the state information to use in the ChangePassword control.

Control state is intended for small amounts of critical data, such as a page index or a keyword. Using control state for large amounts of data can adversely affect page performance.

Applies to

See also