Control.OnLoad(EventArgs) 메서드

정의

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 -> unit
Protected Overridable Sub OnLoad (e As EventArgs)
Protected Friend Overridable Sub OnLoad (e As EventArgs)

매개 변수

e
EventArgs

이벤트 데이터를 포함하는 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 메서드를 호출하여 구독자에게 이벤트를 알립니다.

적용 대상

추가 정보