Control.OnLoad(EventArgs) 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
引发 Load 事件。
protected:
 virtual void OnLoad(EventArgs ^ e);protected public:
 virtual void OnLoad(EventArgs ^ e);protected virtual void OnLoad(EventArgs e);protected internal virtual void OnLoad(EventArgs e);abstract member OnLoad : EventArgs -> unit
override this.OnLoad : EventArgs -> unitProtected Overridable Sub OnLoad (e As EventArgs)Protected Friend Overridable Sub OnLoad (e As EventArgs)参数
示例
// Override the OnLoad method to set _text to
// a default value if it is null.
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    if (_text == null)
        _text = "Here is some default text.";
}
Protected Overrides Sub OnLoad(ByVal e As EventArgs)
    MyBase.OnLoad(e)
    If _text Is Nothing Then
        _text = "Here is some default text."
    End If
End Sub
注解
ASP.NET 调用此方法以引发 Load 事件。 如果要开发自定义控件,可以重写此方法以提供其他处理。 如果重写此方法,请调用基控件的 OnLoad 方法以通知事件订阅者。