XhtmlTextWriter.WriteBreak 方法

定义

<br/> 元素写入 XHTML 输出流。

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

示例

下面的代码示例演示如何重写继承HtmlTextWriter.BeginRender的方法,以便使用 方法编写文本字符串,并使用 HtmlTextWriter.WriteWriteBreak 方法编写<br/>元素。

// 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

适用于