Page.RequiresControlState(Control) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定指定 Control 对象是否已注册以参与控制状态管理。
public:
bool RequiresControlState(System::Web::UI::Control ^ control);
public bool RequiresControlState(System.Web.UI.Control control);
member this.RequiresControlState : System.Web.UI.Control -> bool
Public Function RequiresControlState (control As Control) As Boolean
参数
返回
注解
控件状态是由 Web 服务器控件需要正常运行的关键视图状态数据构成的对象;它包含在与普通视图状态不同的对象中。
使用控件状态的 RegisterRequiresControlState 自定义控件在保存控件状态之前必须调用该方法。 使用该方法 RequiresControlState 检查在页面注册的控件是否为需要控件状态。