Html32TextWriter 類別

定義

將一系列 HTML 3.2 特定字元和文字寫入 ASP.NET 伺服器控制項的輸出資料流。 Html32TextWriter 類別會提供格式化功能,讓 ASP.NET 伺服器控制項可在向用戶端呈現 HTML 3.2 內容時加以使用。

public ref class Html32TextWriter : System::Web::UI::HtmlTextWriter
public class Html32TextWriter : System.Web.UI.HtmlTextWriter
type Html32TextWriter = class
    inherit HtmlTextWriter
Public Class Html32TextWriter
Inherits HtmlTextWriter
繼承
衍生

範例

下列程式碼範例示範如何使用衍生自 類別的 Html32TextWriter 類別,名為 CustomHtml32TextWriterCustomHtml32TextWriter 會建立兩個建構函式,遵循 類別所 HtmlTextWriter 建立的模式,並覆寫 RenderBeforeContentRenderAfterContentRenderBeforeTagRenderAfterTag 方法。

using System.IO;
using System.Web.UI;

namespace Examples.AspNet
{
    public class CustomHtml32TextWriter : Html32TextWriter
    {
        // Create a constructor for the class
        // that takes a TextWriter as a parameter.
        public CustomHtml32TextWriter(TextWriter writer) 
            : this(writer, DefaultTabString) 
        {
        }

        // Create a constructor for the class that takes
        // a TextWriter and a string as parameters.
        public CustomHtml32TextWriter(TextWriter writer, String tabString) 
            : base(writer, tabString)
        {
        }
        
        // Override the RenderBeforeContent method to render
        // styles before rendering the content of a <th> element.
        protected override string RenderBeforeContent()
        {
            // Check the TagKey property. If its value is
            // HtmlTextWriterTag.TH, check the value of the 
            // SupportsBold property. If true, return the
            // opening tag of a <b> element; otherwise, render
            // the opening tag of a <font> element with a color
            // attribute set to the hexadecimal value for red.
            if (TagKey == HtmlTextWriterTag.Th)
            {
                if (SupportsBold)
                    return "<b>";
                else
                    return "<font color=\"FF0000\">";
            }

            // Check whether the element being rendered
            // is an <H4> element. If it is, check the 
            // value of the SupportsItalic property.
            // If true, render the opening tag of the <i> element
            // prior to the <H4> element's content; otherwise, 
            // render the opening tag of a <font> element 
            // with a color attribute set to the hexadecimal
            // value for navy blue.
            if (TagKey == HtmlTextWriterTag.H4)
            {
                if (SupportsItalic)
                    return "<i>";
                else
                    return "<font color=\"000080\">";
            }
            // Call the base method.
            return base.RenderBeforeContent();
        }

        // Override the RenderAfterContent method to close
        // styles opened during the call to the RenderBeforeContent
        // method.
        protected override string RenderAfterContent()
        {
            // Check whether the element being rendered is a <th> element.
            // If so, and the requesting device supports bold formatting,
            // render the closing tag of the <b> element. If not,
            // render the closing tag of the <font> element.
            if (TagKey == HtmlTextWriterTag.Th)
            {
                if (SupportsBold)
                    return "</b>";
                else
                    return "</font>";
            }

            // Check whether the element being rendered is an <H4>.
            // element. If so, and the requesting device supports italic
            // formatting, render the closing tag of the <i> element.
            // If not, render the closing tag of the <font> element.
            if (TagKey == HtmlTextWriterTag.H4)
            {
                if (SupportsItalic)
                    return "</i>";
                else
                    return "</font>";
            }
            // Call the base method
            return base.RenderAfterContent();
        }

        // Override the RenderBeforeTag method to render the
        // opening tag of a <small> element to modify the text size of 
        // any <a> elements that this writer encounters.
        protected override string RenderBeforeTag()
        {
            // Check whether the element being rendered is an 
            // <a> element. If so, render the opening tag
            // of the <small> element; otherwise, call the base method.
            if (TagKey == HtmlTextWriterTag.A)
                return "<small>";
            return base.RenderBeforeTag();
        }

        // Override the RenderAfterTag method to render
        // close any elements opened in the RenderBeforeTag
        // method call.
        protected override string RenderAfterTag()
        {
            // Check whether the element being rendered is an
            // <a> element. If so, render the closing tag of the
            // <small> element; otherwise, call the base method.
            if (TagKey == HtmlTextWriterTag.A)
                return "</small>";
            return base.RenderAfterTag();
        }
    }
}
' Create a custom HtmlTextWriter class that overrides 
' the RenderBeforeContent and RenderAfterContent methods.
Imports System.IO
Imports System.Web.UI

Namespace Examples.AspNet


   Public Class CustomHtml32TextWriter
      Inherits Html32TextWriter

        ' Create a constructor for the class
        ' that takes a TextWriter as a parameter.
        Public Sub New(ByVal writer As TextWriter)
            Me.New(writer, DefaultTabString)
        End Sub

        ' Create a constructor for the class that takes
        ' a TextWriter and a string as parameters. 
        Public Sub New(ByVal writer As TextWriter, ByVal tabString As String)
            MyBase.New(writer, tabString)
        End Sub

        ' Override the RenderBeforeContent method to render
        ' styles before rendering the content of a <th> element.
        Protected Overrides Function RenderBeforeContent() As String
            ' Check the TagKey property. If its value is
            ' HtmlTextWriterTag.TH, check the value of the 
            ' SupportsBold property. If true, return the
            ' opening tag of a <b> element; otherwise, render
            ' the opening tag of a <font> element with a color
            ' attribute set to the hexadecimal value for red.
            If TagKey = HtmlTextWriterTag.Th Then
                If (SupportsBold) Then
                    Return "<b>"
                Else
                    Return "<font color=""FF0000"">"
                End If
            End If

            ' Check whether the element being rendered
            ' is an <H4> element. If it is, check the 
            ' value of the SupportsItalic property.
            ' If true, render the opening tag of the <i> element
            ' prior to the <H4> element's content; otherwise, 
            ' render the opening tag of a <font> element 
            ' with a color attribute set to the hexadecimal
            ' value for navy blue.
            If TagKey = HtmlTextWriterTag.H4 Then
                If (SupportsItalic) Then
                    Return "<i>"
                Else
                    Return "<font color=""000080"">"
                End If
            End If
            ' Call the base method.
            Return MyBase.RenderBeforeContent()
        End Function

        ' Override the RenderAfterContent method to close
        ' styles opened during the call to the RenderBeforeContent
        ' method.
        Protected Overrides Function RenderAfterContent() As String

            ' Check whether the element being rendered is a <th> element.
            ' If so, and the requesting device supports bold formatting,
            ' render the closing tag of the <b> element. If not,
            ' render the closing tag of the <font> element.
            If TagKey = HtmlTextWriterTag.Th Then
                If SupportsBold Then
                    Return "</b>"
                Else
                    Return "</font>"
                End If
            End If

            ' Check whether the element being rendered is an <H4>.
            ' element. If so, and the requesting device supports italic
            ' formatting, render the closing tag of the <i> element.
            ' If not, render the closing tag of the <font> element.
            If TagKey = HtmlTextWriterTag.H4 Then
                If (SupportsItalic) Then
                    Return "</i>"
                Else
                    Return "</font>"
                End If
            End If
            ' Call the base method.
            Return MyBase.RenderAfterContent()
        End Function

        ' Override the RenderBeforeTag method to render the
        ' opening tag of a <small> element to modify the text size of 
        ' any <a> elements that this writer encounters.
        Protected Overrides Function RenderBeforeTag() As String
            ' Check whether the element being rendered is an 
            ' <a> element. If so, render the opening tag
            ' of the <small> element; otherwise, call the base method.
            If TagKey = HtmlTextWriterTag.A Then
                Return "<small>"
            End If
            Return MyBase.RenderBeforeTag()
        End Function

        ' Override the RenderAfterTag method to render
        ' close any elements opened in the RenderBeforeTag
        ' method call.
        Protected Overrides Function RenderAfterTag() As String
            ' Check whether the element being rendered is an
            ' <a> element. If so, render the closing tag of the
            ' <small> element; otherwise, call the base method.
            If TagKey = HtmlTextWriterTag.A Then
                Return "</small>"
            End If
            Return MyBase.RenderAfterTag()
        End Function
    End Class
End Namespace

備註

類別 Html32TextWriter 是 類別的 HtmlTextWriter 替代方案。 它會將 HTML 4.0 樣式屬性轉換成相等的 HTML 3.2 標記和屬性。 它會使用 HTML 表格來標準化屬性的傳播,例如色彩和字型。 ASP.NET 透過檢查 TagWriter 類別的 HttpBrowserCapabilities 屬性,自動將此類別用於 HTML 3.2 和更早版本的瀏覽器。 除非您建立以使用 HTML 3.2 標記之裝置為目標的自訂頁面或控制項配接器,否則您不需要明確建立 類別的 Html32TextWriter 實例。

如需自訂頁面和控制項轉譯的詳細資訊,請參閱逐步解 說:開發和使用自訂 Web 服務器控制項

建構函式

Html32TextWriter(TextWriter)

當提出要求的瀏覽器需要行縮排時,使用在 Html32TextWriter 欄位內指定的行縮排,初始化 DefaultTabString 類別的新執行個體。

Html32TextWriter(TextWriter, String)

使用指定的行縮排,初始化 Html32TextWriter 類別的新執行個體。

欄位

CoreNewLine

儲存這個 TextWriter 所使用的新行字元。

(繼承來源 TextWriter)
DefaultTabString

表示單一定位字元。

(繼承來源 HtmlTextWriter)
DoubleQuoteChar

表示引號 (") 字元。

(繼承來源 HtmlTextWriter)
EndTagLeftChars

表示標記項目結尾標記的左角括弧和斜線符號 (</)。

(繼承來源 HtmlTextWriter)
EqualsChar

表示等號 (=)。

(繼承來源 HtmlTextWriter)
EqualsDoubleQuoteString

表示組成字串 (=") 的等號 (=) 和雙引號 (")。

(繼承來源 HtmlTextWriter)
SelfClosingChars

表示空格以及標記的自行結尾斜線符號 (/)。

(繼承來源 HtmlTextWriter)
SelfClosingTagEnd

表示自我結尾標記項目的結尾斜線符號和右角括弧 (/>)。

(繼承來源 HtmlTextWriter)
SemicolonChar

表示分號 (;)。

(繼承來源 HtmlTextWriter)
SingleQuoteChar

表示所有格符號 (')。

(繼承來源 HtmlTextWriter)
SlashChar

表示斜線符號 (/)。

(繼承來源 HtmlTextWriter)
SpaceChar

表示空格 ( ) 字元。

(繼承來源 HtmlTextWriter)
StyleEqualsChar

表示樣式等號 (:) 字元,此字元用來設定樣式屬性等於值。

(繼承來源 HtmlTextWriter)
TagLeftChar

表示標記的開頭角括弧 (<)。

(繼承來源 HtmlTextWriter)
TagRightChar

表示標記的結尾角括弧 (>)。

(繼承來源 HtmlTextWriter)

屬性

Encoding

取得 HtmlTextWriter 物件用來將內容寫入網頁的編碼。

(繼承來源 HtmlTextWriter)
FontStack

取得要呈現之 HTML 的字型資訊集合。

FormatProvider

取得控制格式設定的物件。

(繼承來源 TextWriter)
Indent

取得或設定定位點位置的數目,此為標記的每一行開頭要縮排的數目。

(繼承來源 HtmlTextWriter)
InnerWriter

取得或設定寫入標記項目內部內容的文字寫入器。

(繼承來源 HtmlTextWriter)
NewLine

取得或設定 HtmlTextWriter 物件所用的行結束字元字串。

(繼承來源 HtmlTextWriter)
ShouldPerformDivTableSubstitution

取得或設定布林值,指出是否將 Table 項目取代成 Div 項目,以減少呈現 HTML 區塊所需的時間。

SupportsBold

取得或設定布林值,指出提出要求的裝置是否支援粗體 HTML 文字。 請使用 SupportsBold 屬性,條件式地呈現粗體文字至 Html32TextWriter 輸出資料流。

SupportsItalic

取得或設定布林值,指出提出要求的裝置是否支援斜體 HTML 文字。 請使用 SupportsItalic 屬性,條件式地呈現斜體文字至 Html32TextWriter 輸出資料流。

TagKey

取得或設定指定標記項目的 HtmlTextWriterTag 值。

(繼承來源 HtmlTextWriter)
TagName

取得或設定所呈現的標記項目的標記名稱。

(繼承來源 HtmlTextWriter)

方法

AddAttribute(HtmlTextWriterAttribute, String)

將標記屬性和屬性值加入項目的開頭標記中,此項目是 HtmlTextWriter 物件經過後續呼叫 RenderBeginTag 方法而建立的。

(繼承來源 HtmlTextWriter)
AddAttribute(HtmlTextWriterAttribute, String, Boolean)

將標記屬性和屬性值加入項目的開頭標記中,此項目是 HtmlTextWriter 物件經過後續呼叫 RenderBeginTag 方法而建立的 (使用選擇性編碼)。

(繼承來源 HtmlTextWriter)
AddAttribute(String, String)

將指定的標記屬性和值加入項目的開頭標記中,這些項目是 HtmlTextWriter 物件經過後續呼叫 RenderBeginTag 方法而建立的。

(繼承來源 HtmlTextWriter)
AddAttribute(String, String, Boolean)

將指定的標記屬性和值加入項目的開頭標記中,這些項目是 HtmlTextWriter 物件經過後續呼叫 RenderBeginTag 方法而建立的 (使用選擇性編碼)。

(繼承來源 HtmlTextWriter)
AddAttribute(String, String, HtmlTextWriterAttribute)

將指定的標記屬性和值,連同 HtmlTextWriterAttribute 列舉值,一起加入此項目的開頭標記中,此項目是 HtmlTextWriter 物件經過後續呼叫 RenderBeginTag 方法而建立的。

(繼承來源 HtmlTextWriter)
AddStyleAttribute(HtmlTextWriterStyle, String)

將與指定的 HtmlTextWriterStyle 值相關聯的標記樣式屬性以及屬性值,加入由對 RenderBeginTag 方法的後續呼叫所建立的開頭標記中。

(繼承來源 HtmlTextWriter)
AddStyleAttribute(String, String)

將指定的標記樣式屬性和屬性值加入由對 RenderBeginTag 方法的後續呼叫所建立的開頭標記中。

(繼承來源 HtmlTextWriter)
AddStyleAttribute(String, String, HtmlTextWriterStyle)

將指定的標記樣式屬性和屬性值,連同 HtmlTextWriterStyle 列舉值,一起加入由對 RenderBeginTag 方法的後續呼叫所建立的開頭標記中。

(繼承來源 HtmlTextWriter)
BeginRender()

將即將要呈現控制項的訊息告知 HtmlTextWriter 物件或衍生類別的物件。

(繼承來源 HtmlTextWriter)
Close()

關閉 HtmlTextWriter 物件,並釋放與它相關的任何系統資源。

(繼承來源 HtmlTextWriter)
CreateObjRef(Type)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。

(繼承來源 MarshalByRefObject)
Dispose()

釋放由 TextWriter 物件使用的所有資源。

(繼承來源 TextWriter)
Dispose(Boolean)

釋放 TextWriter 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。

(繼承來源 TextWriter)
DisposeAsync()

以非同步方式釋放由 TextWriter 物件使用的所有資源。

(繼承來源 TextWriter)
EncodeAttributeValue(HtmlTextWriterAttribute, String)

根據目前內容中 HttpRequest 物件的需求來編碼指定標記屬性的值。

(繼承來源 HtmlTextWriter)
EncodeAttributeValue(String, Boolean)

根據目前內容中 HttpRequest 物件的需求來編碼指定標記屬性的值。

(繼承來源 HtmlTextWriter)
EncodeUrl(String)

執行最少的 URL 編碼,透過的方式是將指定 URL 中的空格轉換為字串 "%20"。

(繼承來源 HtmlTextWriter)
EndRender()

將控制項已完成呈現的訊息告知 HtmlTextWriter 物件或衍生類別的物件。 您可以使用此方法來關閉在 BeginRender() 方法中所開啟的任何標記項目。

(繼承來源 HtmlTextWriter)
EnterStyle(Style)

寫入 <span> 項目的開頭標記,該項目包含實作指定樣式之配置和字元格式的屬性。

(繼承來源 HtmlTextWriter)
EnterStyle(Style, HtmlTextWriterTag)

寫入標記項目的開頭標記,該標記項目包含實作指定樣式之配置和字元格式的屬性。

(繼承來源 HtmlTextWriter)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
ExitStyle(Style)

寫入 <span> 項目的結尾標記,以結束指定的配置與字元格式。

(繼承來源 HtmlTextWriter)
ExitStyle(Style, HtmlTextWriterTag)

寫入指定標記項目的結尾標記,以結束指定的版面配置與字元格式設定。

(繼承來源 HtmlTextWriter)
FilterAttributes()

移除網頁或 Web 伺服器控制項的所有屬性上的所有標記和樣式屬性。

(繼承來源 HtmlTextWriter)
Flush()

清除目前 HtmlTextWriter 物件的所有緩衝區,並使任何緩衝的資料寫入輸出資料流。

(繼承來源 HtmlTextWriter)
FlushAsync()

以非同步的方式清除目前寫入器的所有緩衝區,並造成任何緩衝資料都寫入基礎裝置。

(繼承來源 TextWriter)
FlushAsync(CancellationToken)

以非同步的方式清除目前寫入器的所有緩衝區,並造成任何緩衝資料都寫入基礎裝置。

(繼承來源 TextWriter)
GetAttributeKey(String)

取得指定屬性的對應 HtmlTextWriterAttribute 列舉值。

(繼承來源 HtmlTextWriter)
GetAttributeName(HtmlTextWriterAttribute)

取得與指定的 HtmlTextWriterAttribute 值相關聯的標記屬性名稱。

(繼承來源 HtmlTextWriter)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetLifetimeService()
已淘汰.

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。

(繼承來源 MarshalByRefObject)
GetStyleKey(String)

取得指定樣式的 HtmlTextWriterStyle 列舉值。

(繼承來源 HtmlTextWriter)
GetStyleName(HtmlTextWriterStyle)

取得與指定的 HtmlTextWriterStyle 列舉值相關聯的標記樣式屬性名稱。

(繼承來源 HtmlTextWriter)
GetTagKey(String)

取得與指定標記項目相關聯的 HtmlTextWriterTag 列舉值。

(繼承來源 HtmlTextWriter)
GetTagName(HtmlTextWriterTag)

傳回與指定的 HtmlTextWriterTag 列舉值關聯的 HTML 項目。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
InitializeLifetimeService()
已淘汰.

取得存留期服務物件,以控制這個執行個體的存留期原則。

(繼承來源 MarshalByRefObject)
IsAttributeDefined(HtmlTextWriterAttribute)

判斷指定的標記屬性和其值是否在下一次呼叫 RenderBeginTag 方法期間呈現。

(繼承來源 HtmlTextWriter)
IsAttributeDefined(HtmlTextWriterAttribute, String)

判斷指定的標記屬性和其值是否在下一次呼叫 RenderBeginTag 方法期間呈現。

(繼承來源 HtmlTextWriter)
IsStyleAttributeDefined(HtmlTextWriterStyle)

判斷指定的標記樣式屬性是否會在 RenderBeginTag 方法的下一個呼叫期間呈現。

(繼承來源 HtmlTextWriter)
IsStyleAttributeDefined(HtmlTextWriterStyle, String)

判斷指定的標記樣式屬性以及該屬性的值是否會在 RenderBeginTag 方法的下一個呼叫期間呈現。

(繼承來源 HtmlTextWriter)
IsValidFormAttribute(String)

檢查屬性,確定該屬性可以呈現在 <form> 標記項目的開頭標記中。

(繼承來源 HtmlTextWriter)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。

(繼承來源 MarshalByRefObject)
OnAttributeRender(String, String, HtmlTextWriterAttribute)

判斷指定的標記屬性以及該屬性的值是否可以在目前的標記項目中呈現。

(繼承來源 HtmlTextWriter)
OnStyleAttributeRender(String, String, HtmlTextWriterStyle)

判斷是否將指定的 HTML 樣式屬性和其值寫入輸出資料流。

OnTagRender(String, HtmlTextWriterTag)

判斷是否將指定的 HTML 項目寫入輸出資料流。

OutputTabs()

寫入一系列的定位字串,表示一行的標記字元的縮排層次。

(繼承來源 HtmlTextWriter)
PopEndTag()

從已呈現項目的清單中移除最近儲存的標記項目。

(繼承來源 HtmlTextWriter)
PushEndTag(String)

在產生標記項目的結尾標記時,儲存指定的標記項目,方便以後使用。

(繼承來源 HtmlTextWriter)
RenderAfterContent()

寫入任何出現在 HTML 項目內容之後的文字或間距。

RenderAfterTag()

寫入在 HTML 項目的結尾標記之後的任何空格或文字。

RenderBeforeContent()

寫入任何出現在 HTML 項目所包含之內容之前的定位間距或字型資訊。

RenderBeforeTag()

將任何出現在 HTML 項目開頭標記之前的文字或定位間距寫入 HTML 3.2 輸出資料流。

RenderBeginTag(HtmlTextWriterTag)

將指定之項目的開頭標記寫入 HTML 3.2 輸出資料流。

RenderBeginTag(String)

將指定標記項目的開頭標記寫入到輸出資料流。

(繼承來源 HtmlTextWriter)
RenderEndTag()

將 HTML 項目的結尾標記寫入 Html32TextWriter 輸出資料流,及任何與項目相關的字型資訊。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
Write(Boolean)

將布林值的文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(Char)

將 Unicode 字元的文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(Char[])

將 Unicode 字元陣列的文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(Char[], Int32, Int32)

將 Unicode 字元子陣列的文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(Decimal)

將十進位值的文字表示寫入文字資料流。

(繼承來源 TextWriter)
Write(Double)

將雙精度浮點數的文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(Int32)

將 32 位元組帶正負數的整數之文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(Int64)

將 64 位元組帶正負數的整數之文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(Object)

將物件的文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(ReadOnlySpan<Char>)

將字元範圍寫入文字資料流。

(繼承來源 TextWriter)
Write(Single)

將單精確度浮點數的文字表示以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(String)

將指定字串以及任何暫止定位空格寫入輸出資料流。

(繼承來源 HtmlTextWriter)
Write(String, Object)

將定位字串和已格式化的字串寫入輸出資料流,使用與 Format(String, Object) 方法相同的語意。

(繼承來源 HtmlTextWriter)
Write(String, Object, Object)

將格式化字串 (其中包含兩個物件的文字表示) 以及任何暫止定位空格寫入輸出資料流。 這個方法使用的語意與 Format(String, Object, Object) 方法相同。

(繼承來源 HtmlTextWriter)
Write(String, Object, Object, Object)

使用與 Format(String, Object, Object, Object) 方法相同的語意,將格式化字串寫入文字資料流。

(繼承來源 TextWriter)
Write(String, Object[])

將格式化字串 (其中包含物件陣列的文字表示) 以及任何暫止定位空格寫入輸出資料流。 這個方法使用的語意與 Format(String, Object[]) 方法相同。

(繼承來源 HtmlTextWriter)
Write(StringBuilder)

將字串產生器寫入文字資料流。

(繼承來源 TextWriter)
Write(UInt32)

將 4 位元組不帶正負號的整數文字表示寫入文字資料流。

(繼承來源 TextWriter)
Write(UInt64)

將 8 位元組帶不正負號的整數文字表示寫入文字資料流。

(繼承來源 TextWriter)
WriteAsync(Char)

以非同步方式將字元寫入文字資料流。

(繼承來源 TextWriter)
WriteAsync(Char[])

以非同步方式將字元陣列寫入文字資料流。

(繼承來源 TextWriter)
WriteAsync(Char[], Int32, Int32)

以非同步方式將字元的子陣列寫入文字資料流。

(繼承來源 TextWriter)
WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

以非同步方式將字元記憶體區域寫入文字資料流。

(繼承來源 TextWriter)
WriteAsync(String)

以非同步方式將字串寫入至文字資料流。

(繼承來源 TextWriter)
WriteAsync(StringBuilder, CancellationToken)

以非同步方式將字串產生器寫入文字資料流。

(繼承來源 TextWriter)
WriteAttribute(String, String)

將指定的標記屬性和值寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteAttribute(String, String, Boolean)

將指定的標記屬性和值寫入輸出資料流,並在指定時寫入編碼值。

(繼承來源 HtmlTextWriter)
WriteBeginTag(String)

將指定標記項目的任何定位間距和開頭標記,寫入至輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteBreak()

<br /> 標記項目寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteEncodedText(String)

為要求的裝置編碼指定的文字,然後將其寫入輸出資料流。

(繼承來源 HtmlTextWriter)
WriteEncodedUrl(String)

為指定的 URL 編碼,然後將其寫入輸出資料流。 URL 可能包含參數。

(繼承來源 HtmlTextWriter)
WriteEncodedUrlParameter(String)

針對要求裝置為指定的 URL 參數編碼,然後將此 URL 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteEndTag(String)

寫入指定標記項目的任何定位空格和結尾標記。

(繼承來源 HtmlTextWriter)
WriteFullBeginTag(String)

將指定標記項目的任何定位間距和開頭標記,寫入至輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine()

將行結束字元字串寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Boolean)

將任何暫止定位空格及布林值的文字表示 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Char)

將任何暫止定位空格及 Unicode 字元 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Char[])

將任何暫止定位空格及 Unicode 字元的陣列 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Char[], Int32, Int32)

將任何暫止定位空格及 Unicode 字元的子陣列 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Decimal)

將十進位值的文字表示寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLine(Double)

將任何暫止定位空格及雙精度浮點數的文字表示 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Int32)

將任何暫止定位空格及 32 位元組帶正負號整數的文字表示 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Int64)

將任何暫止定位空格及 64 位元組帶正負號整數的文字表示 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(Object)

將任何暫止定位空格及物件的文字表示 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(ReadOnlySpan<Char>)

將字元範圍的文字表示寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLine(Single)

將任何暫止定位空格及單精確度浮點數的文字表示 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(String)

將任何暫止定位空格及文字字串 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(String, Object)

將任何暫止定位空格及包含物件之文字表示的格式化字串 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(String, Object, Object)

將任何暫止定位空格及包含兩個物件的文字表示之格式化字串 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(String, Object, Object, Object)

使用與 Format(String, Object) 相同的語意,寫出文字資料流中的格式化字串和新行。

(繼承來源 TextWriter)
WriteLine(String, Object[])

將任何暫止定位空格及包含物件陣列的文字表示之格式化字串 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(StringBuilder)

將字串產生器的文字表示寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLine(UInt32)

將任何暫止定位空格及 4 位元組、不帶正負號整數的文字表示 (後面接著行結束字元字串) 寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteLine(UInt64)

將 8 位元組不帶正負號的整數文字表示寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLineAsync()

以非同步方式將行結束字元寫入文字資料流。

(繼承來源 TextWriter)
WriteLineAsync(Char)

以非同步方式將字元寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLineAsync(Char[])

以非同步方式將字元的陣列寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLineAsync(Char[], Int32, Int32)

以非同步方式將字元的子陣列寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

以非同步方式將字元記憶體區域的文字表示寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLineAsync(String)

以非同步方式將字串寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLineAsync(StringBuilder, CancellationToken)

以非同步方式將字串產生器的文字表示寫入文字資料流,後接行結束字元。

(繼承來源 TextWriter)
WriteLineNoTabs(String)

將字串 (後面接著行結束字元字串) 寫入輸出資料流中。 這個方法忽略任何指定的定位空格。

(繼承來源 HtmlTextWriter)
WriteStyleAttribute(String, String)

將指定的樣式屬性寫入輸出資料流中。

(繼承來源 HtmlTextWriter)
WriteStyleAttribute(String, String, Boolean)

將指定的樣式屬性和屬性值寫入輸出資料流中,並在指定時為該值編碼。

(繼承來源 HtmlTextWriter)
WriteUrlEncodedString(String, Boolean)

寫入指定的字串,並根據 URL 需求來為此字串編碼。

(繼承來源 HtmlTextWriter)

明確介面實作

IDisposable.Dispose()

如需這個成員的說明,請參閱 Dispose()

(繼承來源 TextWriter)

適用於

另請參閱