Control.OnUnload(EventArgs) Metoda

Definicja

Unload Zgłasza zdarzenie.

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)

Parametry

e
EventArgs

EventArgs Obiekt, który zawiera dane zdarzenia.

Przykłady

// 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

Uwagi

ASP.NET wywołuje tę metodę w Unload celu zgłoszenia zdarzenia. Jeśli tworzysz kontrolkę niestandardową, możesz zastąpić tę metodę w celu zapewnienia dodatkowego przetwarzania. Jeśli zastąpisz tę metodę, wywołaj metodę kontrolki OnUnload podstawowej, aby powiadomić subskrybentów o zdarzeniu.

Dotyczy

Zobacz też