ChangePassword.SaveControlState 方法
定义
保存将页面回发到服务器之后发生的所有服务器控件状态更改。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
返回
服务器控件的当前状态,否则为 null。The server control's current state; otherwise, null.
注解
使用 SaveControlState 方法可保存控件操作所需的状态信息 ChangePassword 。Use the SaveControlState method to save state information required for the operation of the ChangePassword control. 此控件状态数据与控件的视图状态数据分开存储 ChangePassword 。This control state data is stored separately from the view state data for the ChangePassword control.
在 RegisterRequiresControlState Page 保存控件状态之前,使用控件状态的自定义控件必须对对象调用方法。Custom controls using control state must call the RegisterRequiresControlState method on the Page object before saving control state.
继承者说明
保存控件状态时,字符串对象将作为存储在 HTML < 输入类型 = "hidden"/ > 元素中的变量返回给客户端。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. 重写 SaveControlState() 方法以提取要在控件中使用的状态信息 ChangePassword 。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.