XhtmlTextWriter.WriteBreak Method

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

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

public:
virtual void WriteBreak () override
public void WriteBreak ()
public override function WriteBreak ()
Not applicable.

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.

No code example is currently available or this language may not be supported.
// Override the BeginRender method to write a
// message and call the WriteBreak method
// before a control is rendered.
public void BeginRender()
{
    this.Write("A control is about to render.");
    this.WriteBreak();
} //BeginRender

// Override the EndRender method to
// write a string immediately after 
// a control has rendered. 
public void EndRender()
{
    this.Write("A control just rendered.");
} //EndRender

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: