Control.OnLoad(EventArgs) Control.OnLoad(EventArgs) Control.OnLoad(EventArgs) Control.OnLoad(EventArgs) Method

Definición

Genera el evento Load.Raises the Load event.

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

Parámetros

e
EventArgs EventArgs EventArgs EventArgs

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

Ejemplos

// Override the OnLoad method to set _text to
// a default value if it is null.
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);
    if (_text == null)
        _text = "Here is some default text.";
}
Protected Overrides Sub OnLoad(ByVal e As EventArgs)
    MyBase.OnLoad(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 Load el evento.ASP.NET calls this method to raise the Load event. Si va a desarrollar 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 al método del OnLoad control base para notificar a los suscriptores al evento.If you override this method, call the base control's OnLoad method to notify subscribers to the event.

Se aplica a

Consulte también: