Html32TextWriter 类

定义

向 ASP.NET 服务器控件的输出流写入一系列特定于 HTML 3.2 的字符和文本。 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 类的名为 CustomHtml32TextWriter的类。 CustomHtml32TextWriter 创建两个构造函数,这些构造函数遵循由 类建立的 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)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。

(继承自 MarshalByRefObject)
Dispose()

释放由 TextWriter 对象使用的所有资源。

(继承自 TextWriter)
Dispose(Boolean)

释放由 TextWriter 占用的非托管资源,还可以另外再释放托管资源。

(继承自 TextWriter)
DisposeAsync()

异步释放由 TextWriter 对象使用的所有资源。

(继承自 TextWriter)
EncodeAttributeValue(HtmlTextWriterAttribute, String)

根据当前上下文的 HttpRequest 对象的要求,对指定标记特性的值进行编码。

(继承自 HtmlTextWriter)
EncodeAttributeValue(String, Boolean)

根据当前上下文的 HttpRequest 对象的要求,对指定标记特性的值进行编码。

(继承自 HtmlTextWriter)
EncodeUrl(String)

通过将指定的 URL 中的空格转换为字符串“%20”,以执行最小 URL 编码。

(继承自 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()
已过时.

检索控制此实例的生存期策略的当前生存期服务对象。

(继承自 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 参数进行编码,然后将它写入到输出流。

(继承自 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)

适用于

另请参阅