HtmlTextWriter.WriteBreak Method

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

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

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

Use the WriteBreak method to render line breaks in custom control or adapter markup. The WriteBreak method writes a space between the br and / for improved HTML compatibility.

The following code example shows how to call the WriteBreak method to write a <br /> element to the requesting browser after the WriteEncodedText method writes the encoded &lt;custID&gt; &amp; &lt;invoice#&gt; markup.

No code example is currently available or this language may not be supported.
// Assign a value to a string variable,
// encode it, and write it to a page.
colHeads = "<custID> & <invoice#>";
writer.WriteEncodedText(colHeads);
writer.WriteBreak();

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: