System.Web.UI.WebControls.ChangePassword.SaveViewState Method

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

Syntax

protected override object SaveViewState ()

Returns

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

Remarks

View state is the accumulation of the values of the properties for the System.Web.UI.WebControls.ChangePassword control. These values are automatically placed in the System.Web.UI.Control.ViewState property for the System.Web.UI.WebControls.ChangePassword control, which is an instance of the System.Web.UI.StateBag class. The value for the System.Web.UI.Control.ViewState property is then persisted to a string object after the save state stage of the System.Web.UI.WebControls.ChangePassword control life cycle. For more information, see Control Execution Lifecycle.

When view state is saved, this string object is returned to the client as a variable that is stored in an HTML <input type="hidden" /> element. When you author custom server controls, you can improve efficiency by overriding the ChangePassword.SaveViewState method and modifying the System.Web.UI.Control.ViewState property for the System.Web.UI.WebControls.ChangePassword control.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0