Control.OnPreRender(EventArgs) Método

Definición

Inicia el evento PreRender.Raises the PreRender event.

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

Parámetros

e
EventArgs

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

Ejemplos

// Override the OnPreRender method to set _message to
// a default value if it is null.
protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);
    if (_message == null)
        _message = "Here is some default text.";
}
' Override the OnPreRender method to set _message to
' a default value if it is null.
Protected Overrides Sub OnPreRender(ByVal e As EventArgs)
    MyBase.OnPreRender(e)
    If _message Is Nothing Then
        _message = "Here is some default text."
    End If
End Sub

Comentarios

ASP.NET llama a este método para generar el evento PreRender.ASP.NET calls this method to raise the PreRender 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 OnPreRender del control base para notificar a los suscriptores al evento.If you override this method, call the base control's OnPreRender method to notify subscribers to the event.

Se aplica a

Consulte también: