Control.OnUnload(EventArgs) 메서드

정의

Unload 이벤트를 발생시킵니다.

protected:
 virtual void OnUnload(EventArgs ^ e);
protected public:
 virtual void OnUnload(EventArgs ^ e);
protected virtual void OnUnload (EventArgs e);
protected internal virtual void OnUnload (EventArgs e);
abstract member OnUnload : EventArgs -> unit
override this.OnUnload : EventArgs -> unit
Protected Overridable Sub OnUnload (e As EventArgs)
Protected Friend Overridable Sub OnUnload (e As EventArgs)

매개 변수

e
EventArgs

이벤트 데이터가 들어 있는 EventArgs입니다.

예제

// Override the OnUnLoad method to set _text to
// a default value if it is null.
protected override void OnUnload(EventArgs e)
{
    base.OnUnload(e);
    if (_text == null)
        _text = "Here is some default text.";
}
' Override the OnUnLoad method to set _text to
' a default value if it is null.
Protected Overrides Sub OnUnload(ByVal e As EventArgs)
    MyBase.OnUnload(e)
    If _text Is Nothing Then
        _text = "Here is some default text."
    End If
End Sub

설명

ASP.NET 이 메서드를 호출하여 이벤트를 발생합니다 Unload . 사용자 지정 컨트롤을 개발하는 경우 추가 처리를 제공하기 위해 이 메서드를 재정의할 수 있습니다. 이 메서드를 재정의하는 경우 기본 컨트롤의 OnUnload 메서드를 호출하여 구독자에게 이벤트를 알립니다.

적용 대상

추가 정보