Control.OnUnload(EventArgs) Metoda

Definicja

Podnosi Unload zdarzenie.Raises the Unload event.

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

EventArgsObiekt, który zawiera dane zdarzenia.An EventArgs object that contains event data.

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ę, aby zgłosić Unload zdarzenie.ASP.NET calls this method to raise the Unload event. Jeśli tworzysz kontrolkę niestandardową, możesz zastąpić tę metodę, aby zapewnić dodatkowe przetwarzanie.If you are developing a custom control, you can override this method in order to provide additional processing. Jeśli zastąpisz tę metodę, wywołaj metodę formantu podstawowego, OnUnload aby powiadomić subskrybentów o zdarzeniu.If you override this method, call the base control's OnUnload method to notify subscribers to the event.

Dotyczy

Zobacz też