当服务器控件加载到
Page 对象中时发生。
命名空间:System.Web.UI
程序集:System.Web(在 system.web.dll 中)
Public Event Load As EventHandler
Dim instance As Control
Dim handler As EventHandler
AddHandler instance.Load, handler
public event EventHandler Load
public:
event EventHandler^ Load {
void add (EventHandler^ value);
void remove (EventHandler^ value);
}
/** @event */
public void add_Load (EventHandler value)
/** @event */
public void remove_Load (EventHandler value)
JScript 支持使用事件,但不支持进行新的声明。
通知服务器控件执行任何设置为在每次页请求时发生的处理步骤。可以访问该事件的视图状态信息和 Web 窗体 POST 数据。还可以访问页控件层次结构内的其他服务器控件。
' This is the constructor for a custom Page class.
' When this constructor is called, it associates the Control.Load event,
' which the Page class inherits from the Control class, with the Page_Load
' event handler for this version of the page.
Public Sub New()
AddHandler Load, AddressOf Page_Load
End Sub 'New
// This is the constructor for a custom Page class.
// When this constructor is called, it associates the Control.Load event,
// which the Page class inherits from the Control class, with the Page_Load
// event handler for this version of the page.
public MyPage()
{
Load += new EventHandler(Page_Load);
}
// This is the constructor for a custom Page class.
// When this constructor is called, it associates the Control.Load event,
// which the Page class inherits from the Control class, with the Page_Load
// event handler for this version of the page.
public MyPage()
{
add_Load(new EventHandler(Page_Load));
} //MyPage
Windows 98、Windows 2000 SP4、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
.NET Framework
受以下版本支持:2.0、1.1、1.0