Control.OnUnload(EventArgs) メソッド
定義
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)
パラメーター
例
// 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 ます。ASP.NET calls this method to raise the Unload event. カスタムコントロールを開発している場合は、追加の処理を提供するために、このメソッドをオーバーライドできます。If you are developing a custom control, you can override this method in order to provide additional processing. このメソッドをオーバーライドする場合は、基本コントロールのメソッドを呼び出して、 OnUnload サブスクライバーにイベントを通知します。If you override this method, call the base control's OnUnload method to notify subscribers to the event.