MobileControl.OnLoad(EventArgs) 方法
定义
引发 Unload 事件。Raises the Unload event. 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.
protected:
override void OnLoad(EventArgs ^ e);
protected override void OnLoad (EventArgs e);
override this.OnLoad : EventArgs -> unit
Protected Overrides Sub OnLoad (e As EventArgs)
参数
例外
该控件包含自定义特性,而当前页不允许控件上存在自定义特性。the control contains custom attributes and the current page does not allow custom attributes on controls.
注解
此方法通知服务器控件它应执行与它关联的页的每个 HTTP 请求所共有的操作,如设置数据库查询。This method notifies the server control that it should perform actions common to each HTTP request for the page it is associated with, such as setting up a database query. 在页面生命周期的此阶段中,将创建并初始化层次结构中的服务器控件,还原视图状态,并且窗体控件将反映客户端数据。At this stage in the page lifecycle, server controls in the hierarchy are created and initialized, view state is restored, and form controls reflect client-side data.
使用 IsPostBack 属性可确定是否正在加载页面以响应客户端回发,或是否首次加载和访问该页面。Use the IsPostBack property to determine whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.