请单击以进行评分并提供反馈
MSDN
MSDN Library
.NET 开发
先前版本
System.Web.UI
Control 类
Control 事件
 Load 事件

  开启低带宽视图
此页面仅适用于
Microsoft Visual Studio 2005/.NET Framework 2.0

同时提供下列产品的其他版本:
.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
社区内容   什么是社区内容?
添加新内容 RSS  批注
Processing
© 2009 Microsoft Corporation 版权所有。 保留所有权利  |  商标  |  隐私权声明
Page view tracker