.NET Framework 类库
Control.Load 事件

当服务器控件加载到 Page 对象中时发生。

命名空间:System.Web.UI
程序集:System.Web(在 system.web.dll 中)

语法

Visual Basic(声明)
Public Event Load As EventHandler
Visual Basic(用法)
Dim instance As Control
Dim handler As EventHandler

AddHandler instance.Load, handler
C#
public event EventHandler Load
C++
public:
event EventHandler^ Load {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
J#
/** @event */
public void add_Load (EventHandler value)

/** @event */
public void remove_Load (EventHandler value)
JScript
JScript 支持使用事件,但不支持进行新的声明。
备注

通知服务器控件执行任何设置为在每次页请求时发生的处理步骤。可以访问该事件的视图状态信息和 Web 窗体 POST 数据。还可以访问页控件层次结构内的其他服务器控件。

TopicLocation
如何:创建 ASP.NET 用户控件生成 ASP .NET Web 应用程序
如何:在 ASP.NET 网页中创建事件处理程序生成 ASP .NET Web 应用程序
如何:在 ASP.NET 网页中创建事件处理程序 (Visual Studio)在 Visual Studio 中构建 ASP .NET Web 应用程序
如何:在 ASP.NET 网页中创建事件处理程序 (Visual Studio)在 Visual Studio 中生成 ASP .NET Web 应用程序
示例

Visual Basic
' 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
C#
// 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);
}
J#
// 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
请参见

标记 :


Page view tracker