Control.OnUnload(EventArgs) Metodo

Definizione

Genera l'evento 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)

Parametri

e
EventArgs

Oggetto EventArgs che contiene i dati dell'evento.

Esempio

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

Commenti

ASP.NET chiama questo metodo per generare l'evento Unload . Se si sta sviluppando un controllo personalizzato, è possibile eseguire l'override di questo metodo per fornire un'elaborazione aggiuntiva. Se si esegue l'override di questo metodo, chiamare il metodo del OnUnload controllo di base per inviare notifiche ai sottoscrittori all'evento.

Si applica a

Vedi anche