XhtmlTextWriter.WriteBreak 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將 <br/>
項目寫入至 XHTML 輸出資料流。
public:
override void WriteBreak();
public override void WriteBreak ();
override this.WriteBreak : unit -> unit
Public Overrides Sub WriteBreak ()
範例
下列程式碼範例示範如何覆寫繼承 HtmlTextWriter.BeginRender 的方法,以使用 HtmlTextWriter.Write 方法撰寫文字字串,以及 <br/>
使用 方法的 WriteBreak 元素。
// 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