Compartir a través de


XhtmlTextWriter.WriteBreak Método

Definición

Escribe un elemento <br/> en el flujo de salida XHTML.

public:
 override void WriteBreak();
public override void WriteBreak ();
override this.WriteBreak : unit -> unit
Public Overrides Sub WriteBreak ()

Ejemplos

En el ejemplo de código siguiente se muestra cómo invalidar el método heredado HtmlTextWriter.BeginRender para escribir una cadena de texto con el HtmlTextWriter.Write método y un <br/> elemento con el WriteBreak método .

// Override the BeginRender method to write a
// message and call the WriteBreak method
// before a control is rendered.
override public void BeginRender()
{
   this.Write("A control is about to render.");
   this.WriteBreak();
}

// Override the EndRender method to
// write a string immediately after 
// a control has rendered. 
override public void EndRender()
{
   this.Write("A control just rendered.");
}
' Override the BeginRender method to write a
' message and call the WriteBreak method
' before a control is rendered.
Overrides Public Sub BeginRender()
   Me.Write("A control is about to render.")
   Me.WriteBreak()
End Sub

' Override the EndRender method to
' write a string immediately after 
' a control has rendered. 
Overrides Public Sub EndRender()
   Me.Write("A control just rendered.")
End Sub

Se aplica a