XhtmlTextWriter.WriteBreak Method ()

 

Writes a <br/> element to the XHTML output stream.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public override void WriteBreak()

The following code example demonstrates how to override the inherited HtmlTextWriter.BeginRender method to write a text string with the HtmlTextWriter.Write method and a <br/> element with the WriteBreak method.

// 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.");
}  

.NET Framework
Available since 2.0
Return to top
Show: