Control.OnUnload(EventArgs) Control.OnUnload(EventArgs) Control.OnUnload(EventArgs) Control.OnUnload(EventArgs) Method

Definición

Genera el evento Unload.Raises the Unload event.

protected public:
 virtual void OnUnload(EventArgs ^ e);
protected internal virtual void OnUnload (EventArgs e);
abstract member OnUnload : EventArgs -> unit
override this.OnUnload : EventArgs -> unit
Protected Friend Overridable Sub OnUnload (e As EventArgs)

Parámetros

e
EventArgs EventArgs EventArgs EventArgs

Objeto EventArgs que contiene los datos del evento.An EventArgs object that contains event data.

Ejemplos

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

Comentarios

ASP.NET llama a este método para generar el Unload eventos.ASP.NET calls this method to raise the Unload event. Si está desarrollando un control personalizado, puede invalidar este método para proporcionar un procesamiento adicional.If you are developing a custom control, you can override this method in order to provide additional processing. Si invalida este método, llame a la base del control OnUnload método para notificar a los suscriptores al evento.If you override this method, call the base control's OnUnload method to notify subscribers to the event.

Se aplica a

Consulte también: