Control.OnUnload(EventArgs) Metodo
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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)
// 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 chiama questo metodo per generare l'evento Unload . Se si sviluppa un controllo personalizzato, è possibile eseguire l'override di questo metodo per fornire ulteriore elaborazione. Se si esegue l'override di questo metodo, chiamare il metodo del controllo di OnUnload base per notificare ai sottoscrittori l'evento.
Prodotto | Versioni |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Feedback su .NET
.NET è un progetto open source. Seleziona un collegamento per fornire feedback: