Control.OnPreRender(EventArgs) Control.OnPreRender(EventArgs) Control.OnPreRender(EventArgs) Control.OnPreRender(EventArgs) Method

Definición

Genera el evento PreRender.Raises the PreRender event.

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

Parámetros

e
EventArgs EventArgs EventArgs EventArgs

Objeto EventArgs que contiene los datos del 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 PreRender eventos.ASP.NET calls this method to raise the PreRender 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 OnPreRender método 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: