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 メソッドを呼び出して、サブスクライバーにイベントを通知します。

適用対象

こちらもご覧ください