ChtmlTextWriter ChtmlTextWriter ChtmlTextWriter ChtmlTextWriter Class

Definition

Writes a series of cHTML-specific characters and text to the output stream of an ASP.NET server control. The ChtmlTextWriter class provides formatting capabilities that ASP.NET server controls use when rendering cHTML content to clients.

public ref class ChtmlTextWriter : System::Web::UI::Html32TextWriter
public class ChtmlTextWriter : System.Web.UI.Html32TextWriter
type ChtmlTextWriter = class
    inherit Html32TextWriter
Public Class ChtmlTextWriter
Inherits Html32TextWriter
Inheritance

Examples

The following code example demonstrates how to create a class named CustomChtmlTextWriter that is derived from the ChtmlTextWriter class. It creates two constructors and overrides the OnAttributeRender method to prevent the bgcolor style attribute from being written to the output stream of the ChtmlTextWriter object. It also creates a class named ChtmlCustomPageAdapter that defines one method, CreateCustomChtmlTextWriter, which creates and returns an instance of the CustomChtmlTextWriter class. The CustomChtmlTextWriter then renders cHTML content for a page to devices with browsers that use cHTML markup.

// Create a class that derives from the
// ChtmlTextWriter class.
using System;
using System.IO;
using System.Web.UI;
using System.Web.UI.WebControls.Adapters;

namespace AspNet.Samples.CS
{
	public class CustomChtmlTextWriter : ChtmlTextWriter
	{
		// Create two constructors for the new
		// text writer.
		public CustomChtmlTextWriter(TextWriter writer) : base(writer, DefaultTabString)
		{
		}

		public CustomChtmlTextWriter(TextWriter writer, String tabString)
			: base(writer, tabString)
		{
		}
		
		// Override the OnAttributeRender method to
		// not render the bgcolor attribute, which is
		// not supported in CHTML.
		protected override bool OnAttributeRender(string name, string value, HtmlTextWriterAttribute key)
		{
			if (String.Equals("bgcolor", name))
			{
				return false;
			}
			
			// Call the ChtmlTextWriter version of the
			// the OnAttributeRender method.
			return base.OnAttributeRender(name, value, key);
		}
	}

	// Derive from the WebControlAdapter class,
	// provide a CreateCustomChtmlTextWriter
	// method to attach to the custom writer.
	public class ChtmlCustomPageAdapter : WebControlAdapter
	{
		protected internal ChtmlTextWriter CreateCustomChtmlTextWriter(
			TextWriter writer)
		{
			return new CustomChtmlTextWriter(writer);
		}
	}
}
' Create a class that derives from the
' ChtmlTextWriter class.
Imports System
Imports System.IO
Imports System.Web.UI
Imports System.Web.UI.WebControls.Adapters

Namespace AspNet.Samples.VB

    Public Class CustomChtmlTextWriter
        Inherits ChtmlTextWriter

        ' Create two constructors for the new
        ' text writer.
        Public Sub New(ByVal writer As TextWriter)
            MyClass.New(writer, DefaultTabString)
        End Sub

        Public Sub New(ByVal writer As TextWriter, ByVal tabString As String)
            MyBase.New(writer, tabString)
        End Sub

        ' Override the OnAttributeRender method to
        ' not render the bgcolor attribute, which is 
        ' not supported in CHTML.
        Protected Overrides Function OnAttributeRender(ByVal name As String, ByVal value As String, ByVal key As HtmlTextWriterAttribute) As Boolean
            If (String.Equals("bgcolor", name)) Then
                Return False
            End If

            ' Call the ChtmlTextWriter version of 
            ' the OnAttributeRender method.
            MyBase.OnAttributeRender(name, value, key)

        End Function
    End Class

    ' Derive from the WebControlAdapter class,
    ' provide a CreateCustomChtmlTextWriter
    ' method to attach the custom writer.
    Public Class ChtmlCustomPageAdapter
        Inherits WebControlAdapter

        Protected Friend Function CreateCustomChtmlTextWriter( _
         ByVal writer As TextWriter) As ChtmlTextWriter

            Return New CustomChtmlTextWriter(writer)

        End Function
    End Class
End Namespace

Remarks

Compact HTML, or cHTML, is a subset of HTML 2.0, HTML 3.2, and HTML 4.0, and is designed to render on devices with limited memory and CPU power, along with small display screens, limited formatting capabilities, and a limited number of input options (such as a cell phone touch pad). Therefore, cHTML does not support the following:

  • JPEG images.

  • Tables.

  • Image maps.

  • Multiple character fonts and styles.

  • Background colors and images.

  • Frames.

  • Style sheets.

The ChtmlTextWriter class derives from the Html32TextWriter class and much of its functionality is provided by the Html32TextWriter and the base class for all markup text writers, which is the HtmlTextWriter class.

Constructors

ChtmlTextWriter(TextWriter) ChtmlTextWriter(TextWriter) ChtmlTextWriter(TextWriter) ChtmlTextWriter(TextWriter)

Initializes a new instance of the ChtmlTextWriter class that uses the DefaultTabString constant to indent lines.

ChtmlTextWriter(TextWriter, String) ChtmlTextWriter(TextWriter, String) ChtmlTextWriter(TextWriter, String) ChtmlTextWriter(TextWriter, String)

Initializes a new instance of the ChtmlTextWriter class with the specified line indentation.

Properties

Encoding Encoding Encoding Encoding

Gets the encoding that the HtmlTextWriter object uses to write content to the page.

(Inherited from HtmlTextWriter)
FontStack FontStack FontStack FontStack

Gets a collection of font information for the HTML to render.

(Inherited from Html32TextWriter)
FormatProvider FormatProvider FormatProvider FormatProvider

Gets an object that controls formatting.

(Inherited from TextWriter)
GlobalSuppressedAttributes GlobalSuppressedAttributes GlobalSuppressedAttributes GlobalSuppressedAttributes

Gets a Hashtable object of globally suppressed attributes that cannot be rendered on cHTML elements.

Indent Indent Indent Indent

Gets or sets the number of tab positions to indent the beginning of each line of markup.

(Inherited from HtmlTextWriter)
InnerWriter InnerWriter InnerWriter InnerWriter

Gets or sets the text writer that writes the inner content of the markup element.

(Inherited from HtmlTextWriter)
NewLine NewLine NewLine NewLine

Gets or sets the line terminator string used by the HtmlTextWriter object.

(Inherited from HtmlTextWriter)
RecognizedAttributes RecognizedAttributes RecognizedAttributes RecognizedAttributes

Gets a Hashtable object of recognized attributes that could be rendered on cHTML elements.

ShouldPerformDivTableSubstitution ShouldPerformDivTableSubstitution ShouldPerformDivTableSubstitution ShouldPerformDivTableSubstitution

Gets or sets a Boolean value indicating whether to replace a Table element with a Div element to reduce the time that it takes to render a block of HTML.

(Inherited from Html32TextWriter)
SupportsBold SupportsBold SupportsBold SupportsBold

Gets or sets a Boolean value indicating whether the requesting device supports bold HTML text. Use the SupportsBold property to conditionally render bold text to the Html32TextWriter output stream.

(Inherited from Html32TextWriter)
SupportsItalic SupportsItalic SupportsItalic SupportsItalic

Gets or sets a Boolean value indicating whether the requesting device supports italic HTML text. Use the SupportsItalic property to conditionally render italicized text to the Html32TextWriter output stream.

(Inherited from Html32TextWriter)
SuppressedAttributes SuppressedAttributes SuppressedAttributes SuppressedAttributes

Gets a Hashtable object of user-specified suppressed attributes that are not rendered on cHTML elements.

TagKey TagKey TagKey TagKey

Gets or sets the HtmlTextWriterTag value for the specified markup element.

(Inherited from HtmlTextWriter)
TagName TagName TagName TagName

Gets or sets the tag name of the markup element being rendered.

(Inherited from HtmlTextWriter)

Methods

AddAttribute(HtmlTextWriterAttribute, String) AddAttribute(HtmlTextWriterAttribute, String) AddAttribute(HtmlTextWriterAttribute, String) AddAttribute(HtmlTextWriterAttribute, String)

Adds the markup attribute and the attribute value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
AddAttribute(HtmlTextWriterAttribute, String, Boolean) AddAttribute(HtmlTextWriterAttribute, String, Boolean) AddAttribute(HtmlTextWriterAttribute, String, Boolean) AddAttribute(HtmlTextWriterAttribute, String, Boolean)

Adds the markup attribute and the attribute value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method, with optional encoding.

(Inherited from HtmlTextWriter)
AddAttribute(String, String) AddAttribute(String, String) AddAttribute(String, String) AddAttribute(String, String)

Adds the specified markup attribute and value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
AddAttribute(String, String, Boolean) AddAttribute(String, String, Boolean) AddAttribute(String, String, Boolean) AddAttribute(String, String, Boolean)

Adds the specified markup attribute and value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method, with optional encoding.

(Inherited from HtmlTextWriter)
AddAttribute(String, String, HtmlTextWriterAttribute) AddAttribute(String, String, HtmlTextWriterAttribute) AddAttribute(String, String, HtmlTextWriterAttribute) AddAttribute(String, String, HtmlTextWriterAttribute)

Adds the specified markup attribute and value, along with an HtmlTextWriterAttribute enumeration value, to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
AddRecognizedAttribute(String, String) AddRecognizedAttribute(String, String) AddRecognizedAttribute(String, String) AddRecognizedAttribute(String, String)

Adds an attribute to a cHTML element of the ChtmlTextWriter object.

AddStyleAttribute(HtmlTextWriterStyle, String) AddStyleAttribute(HtmlTextWriterStyle, String) AddStyleAttribute(HtmlTextWriterStyle, String) AddStyleAttribute(HtmlTextWriterStyle, String)

Adds the markup style attribute associated with the specified HtmlTextWriterStyle value and the attribute value to the opening markup tag created by a subsequent call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
AddStyleAttribute(String, String) AddStyleAttribute(String, String) AddStyleAttribute(String, String) AddStyleAttribute(String, String)

Adds the specified markup style attribute and the attribute value to the opening markup tag created by a subsequent call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
AddStyleAttribute(String, String, HtmlTextWriterStyle) AddStyleAttribute(String, String, HtmlTextWriterStyle) AddStyleAttribute(String, String, HtmlTextWriterStyle) AddStyleAttribute(String, String, HtmlTextWriterStyle)

Adds the specified markup style attribute and the attribute value, along with an HtmlTextWriterStyle enumeration value, to the opening markup tag created by a subsequent call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
BeginRender() BeginRender() BeginRender() BeginRender()

Notifies an HtmlTextWriter object, or an object of a derived class, that a control is about to be rendered.

(Inherited from HtmlTextWriter)
Close() Close() Close() Close()

Closes the HtmlTextWriter object and releases any system resources associated with it.

(Inherited from HtmlTextWriter)
CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type) CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the TextWriter object.

(Inherited from TextWriter)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the TextWriter and optionally releases the managed resources.

(Inherited from TextWriter)
DisposeAsync() DisposeAsync() DisposeAsync() DisposeAsync() Inherited from TextWriter
EncodeAttributeValue(HtmlTextWriterAttribute, String) EncodeAttributeValue(HtmlTextWriterAttribute, String) EncodeAttributeValue(HtmlTextWriterAttribute, String) EncodeAttributeValue(HtmlTextWriterAttribute, String)

Encodes the value of the specified markup attribute based on the requirements of the HttpRequest object of the current context.

(Inherited from HtmlTextWriter)
EncodeAttributeValue(String, Boolean) EncodeAttributeValue(String, Boolean) EncodeAttributeValue(String, Boolean) EncodeAttributeValue(String, Boolean)

Encodes the value of the specified markup attribute based on the requirements of the HttpRequest object of the current context.

(Inherited from HtmlTextWriter)
EncodeUrl(String) EncodeUrl(String) EncodeUrl(String) EncodeUrl(String)

Performs minimal URL encoding by converting spaces in the specified URL to the string "%20".

(Inherited from HtmlTextWriter)
EndRender() EndRender() EndRender() EndRender()

Notifies an HtmlTextWriter object, or an object of a derived class, that a control has finished rendering. You can use this method to close any markup elements opened in the BeginRender() method.

(Inherited from HtmlTextWriter)
EnterStyle(Style) EnterStyle(Style) EnterStyle(Style) EnterStyle(Style)

Writes the opening tag of a <span> element that contains attributes that implement the layout and character formatting of the specified style.

(Inherited from HtmlTextWriter)
EnterStyle(Style, HtmlTextWriterTag) EnterStyle(Style, HtmlTextWriterTag) EnterStyle(Style, HtmlTextWriterTag) EnterStyle(Style, HtmlTextWriterTag)

Writes the opening tag of a markup element that contains attributes that implement the layout and character formatting of the specified style.

(Inherited from HtmlTextWriter)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExitStyle(Style) ExitStyle(Style) ExitStyle(Style) ExitStyle(Style)

Writes the closing tag of a <span> element to end the specified layout and character formatting.

(Inherited from HtmlTextWriter)
ExitStyle(Style, HtmlTextWriterTag) ExitStyle(Style, HtmlTextWriterTag) ExitStyle(Style, HtmlTextWriterTag) ExitStyle(Style, HtmlTextWriterTag)

Writes the closing tag of the specified markup element to end the specified layout and character formatting.

(Inherited from HtmlTextWriter)
FilterAttributes() FilterAttributes() FilterAttributes() FilterAttributes()

Removes all the markup and style attributes on all properties of the page or Web server control.

(Inherited from HtmlTextWriter)
Flush() Flush() Flush() Flush()

Clears all buffers for the current HtmlTextWriter object and causes any buffered data to be written to the output stream.

(Inherited from HtmlTextWriter)
FlushAsync() FlushAsync() FlushAsync() FlushAsync()

Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the underlying device.

(Inherited from TextWriter)
GetAttributeKey(String) GetAttributeKey(String) GetAttributeKey(String) GetAttributeKey(String)

Obtains the corresponding HtmlTextWriterAttribute enumeration value for the specified attribute.

(Inherited from HtmlTextWriter)
GetAttributeName(HtmlTextWriterAttribute) GetAttributeName(HtmlTextWriterAttribute) GetAttributeName(HtmlTextWriterAttribute) GetAttributeName(HtmlTextWriterAttribute)

Obtains the name of the markup attribute associated with the specified HtmlTextWriterAttribute value.

(Inherited from HtmlTextWriter)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService() GetLifetimeService() GetLifetimeService() GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetStyleKey(String) GetStyleKey(String) GetStyleKey(String) GetStyleKey(String)

Obtains the HtmlTextWriterStyle enumeration value for the specified style.

(Inherited from HtmlTextWriter)
GetStyleName(HtmlTextWriterStyle) GetStyleName(HtmlTextWriterStyle) GetStyleName(HtmlTextWriterStyle) GetStyleName(HtmlTextWriterStyle)

Obtains the markup style attribute name associated with the specified HtmlTextWriterStyle enumeration value.

(Inherited from HtmlTextWriter)
GetTagKey(String) GetTagKey(String) GetTagKey(String) GetTagKey(String)

Obtains the HtmlTextWriterTag enumeration value associated with the specified markup element.

(Inherited from HtmlTextWriter)
GetTagName(HtmlTextWriterTag) GetTagName(HtmlTextWriterTag) GetTagName(HtmlTextWriterTag) GetTagName(HtmlTextWriterTag)

Returns the HTML element that is associated with the specified HtmlTextWriterTag enumeration value.

(Inherited from Html32TextWriter)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService() InitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
IsAttributeDefined(HtmlTextWriterAttribute) IsAttributeDefined(HtmlTextWriterAttribute) IsAttributeDefined(HtmlTextWriterAttribute) IsAttributeDefined(HtmlTextWriterAttribute)

Determines whether the specified markup attribute and its value are rendered during the next call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
IsAttributeDefined(HtmlTextWriterAttribute, String) IsAttributeDefined(HtmlTextWriterAttribute, String) IsAttributeDefined(HtmlTextWriterAttribute, String) IsAttributeDefined(HtmlTextWriterAttribute, String)

Determines whether the specified markup attribute and its value are rendered during the next call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
IsStyleAttributeDefined(HtmlTextWriterStyle) IsStyleAttributeDefined(HtmlTextWriterStyle) IsStyleAttributeDefined(HtmlTextWriterStyle) IsStyleAttributeDefined(HtmlTextWriterStyle)

Determines whether the specified markup style attribute is rendered during the next call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
IsStyleAttributeDefined(HtmlTextWriterStyle, String) IsStyleAttributeDefined(HtmlTextWriterStyle, String) IsStyleAttributeDefined(HtmlTextWriterStyle, String) IsStyleAttributeDefined(HtmlTextWriterStyle, String)

Determines whether the specified markup style attribute and its value are rendered during the next call to the RenderBeginTag method.

(Inherited from HtmlTextWriter)
IsValidFormAttribute(String) IsValidFormAttribute(String) IsValidFormAttribute(String) IsValidFormAttribute(String)

Checks an attribute to ensure that it can be rendered in the opening tag of a <form> markup element.

(Inherited from HtmlTextWriter)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean) MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
OnAttributeRender(String, String, HtmlTextWriterAttribute) OnAttributeRender(String, String, HtmlTextWriterAttribute) OnAttributeRender(String, String, HtmlTextWriterAttribute) OnAttributeRender(String, String, HtmlTextWriterAttribute)

Determines whether the specified cHTML attribute and its value are rendered to the requesting page. You can override the OnAttributeRender(String, String, HtmlTextWriterAttribute) method in classes that derive from the ChtmlTextWriter class to filter out attributes that you do not want to render on devices that support cHTML.

OnStyleAttributeRender(String, String, HtmlTextWriterStyle) OnStyleAttributeRender(String, String, HtmlTextWriterStyle) OnStyleAttributeRender(String, String, HtmlTextWriterStyle) OnStyleAttributeRender(String, String, HtmlTextWriterStyle)

Determines whether the specified cHTML markup style attribute and its value can be rendered to the current markup element.

OnTagRender(String, HtmlTextWriterTag) OnTagRender(String, HtmlTextWriterTag) OnTagRender(String, HtmlTextWriterTag) OnTagRender(String, HtmlTextWriterTag)

Determines whether the specified cHTML markup element is rendered to the requesting page.

OutputTabs() OutputTabs() OutputTabs() OutputTabs()

Writes a series of tab strings that represent the indentation level for a line of markup characters.

(Inherited from HtmlTextWriter)
PopEndTag() PopEndTag() PopEndTag() PopEndTag()

Removes the most recently saved markup element from the list of rendered elements.

(Inherited from HtmlTextWriter)
PushEndTag(String) PushEndTag(String) PushEndTag(String) PushEndTag(String)

Saves the specified markup element for later use when generating the end tag for a markup element.

(Inherited from HtmlTextWriter)
RemoveRecognizedAttribute(String, String) RemoveRecognizedAttribute(String, String) RemoveRecognizedAttribute(String, String) RemoveRecognizedAttribute(String, String)

Removes an attribute of a cHTML element of the ChtmlTextWriter object.

RenderAfterContent() RenderAfterContent() RenderAfterContent() RenderAfterContent()

Writes any text or spacing that appears after the content of the HTML element.

(Inherited from Html32TextWriter)
RenderAfterTag() RenderAfterTag() RenderAfterTag() RenderAfterTag()

Writes any spacing or text that occurs after an HTML element's closing tag.

(Inherited from Html32TextWriter)
RenderBeforeContent() RenderBeforeContent() RenderBeforeContent() RenderBeforeContent()

Writes any tab spacing or font information that appears before the content that is contained in an HTML element.

(Inherited from Html32TextWriter)
RenderBeforeTag() RenderBeforeTag() RenderBeforeTag() RenderBeforeTag()

Writes any text or tab spacing that occurs before the opening tag of an HTML element to the HTML 3.2 output stream.

(Inherited from Html32TextWriter)
RenderBeginTag(HtmlTextWriterTag) RenderBeginTag(HtmlTextWriterTag) RenderBeginTag(HtmlTextWriterTag) RenderBeginTag(HtmlTextWriterTag)

Writes the opening tag of the specified element to the HTML 3.2 output stream.

(Inherited from Html32TextWriter)
RenderBeginTag(String) RenderBeginTag(String) RenderBeginTag(String) RenderBeginTag(String)

Writes the opening tag of the specified markup element to the output stream.

(Inherited from HtmlTextWriter)
RenderEndTag() RenderEndTag() RenderEndTag() RenderEndTag()

Writes the end tag of an HTML element to the Html32TextWriter output stream, along with any font information that is associated with the element.

(Inherited from Html32TextWriter)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
Write(Boolean) Write(Boolean) Write(Boolean) Write(Boolean)

Writes the text representation of a Boolean value to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(Char) Write(Char) Write(Char) Write(Char)

Writes the text representation of a Unicode character to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(Char[]) Write(Char[]) Write(Char[]) Write(Char[])

Writes the text representation of an array of Unicode characters to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(Char[], Int32, Int32) Write(Char[], Int32, Int32) Write(Char[], Int32, Int32) Write(Char[], Int32, Int32)

Writes the text representation of a subarray of Unicode characters to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(Decimal) Write(Decimal) Write(Decimal) Write(Decimal)

Writes the text representation of a decimal value to the text string or stream.

(Inherited from TextWriter)
Write(Double) Write(Double) Write(Double) Write(Double)

Writes the text representation of a double-precision floating-point number to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(Int32) Write(Int32) Write(Int32) Write(Int32)

Writes the text representation of a 32-byte signed integer to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(Int64) Write(Int64) Write(Int64) Write(Int64)

Writes the text representation of a 64-byte signed integer to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(Object) Write(Object) Write(Object) Write(Object)

Writes the text representation of an object to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(ReadOnlySpan<Char>) Write(ReadOnlySpan<Char>) Write(ReadOnlySpan<Char>) Write(ReadOnlySpan<Char>) Inherited from TextWriter
Write(Single) Write(Single) Write(Single) Write(Single)

Writes the text representation of a single-precision floating-point number to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(String) Write(String) Write(String) Write(String)

Writes the specified string to the output stream, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(String, Object) Write(String, Object) Write(String, Object) Write(String, Object)

Writes a tab string and a formatted string to the output stream, using the same semantics as the Format(String, Object) method, along with any pending tab spacing.

(Inherited from HtmlTextWriter)
Write(String, Object, Object) Write(String, Object, Object) Write(String, Object, Object) Write(String, Object, Object)

Writes a formatted string that contains the text representation of two objects to the output stream, along with any pending tab spacing. This method uses the same semantics as the Format(String, Object, Object) method.

(Inherited from HtmlTextWriter)
Write(String, Object, Object, Object) Write(String, Object, Object, Object) Write(String, Object, Object, Object) Write(String, Object, Object, Object)

Writes a formatted string to the text string or stream, using the same semantics as the Format(String, Object, Object, Object) method.

(Inherited from TextWriter)
Write(String, Object[]) Write(String, Object[]) Write(String, Object[]) Write(String, Object[])

Writes a formatted string that contains the text representation of an object array to the output stream, along with any pending tab spacing. This method uses the same semantics as the Format(String, Object[]) method.

(Inherited from HtmlTextWriter)
Write(StringBuilder) Write(StringBuilder) Write(StringBuilder) Write(StringBuilder) Inherited from TextWriter
Write(UInt32) Write(UInt32) Write(UInt32) Write(UInt32)

Writes the text representation of a 4-byte unsigned integer to the text string or stream.

(Inherited from TextWriter)
Write(UInt64) Write(UInt64) Write(UInt64) Write(UInt64)

Writes the text representation of an 8-byte unsigned integer to the text string or stream.

(Inherited from TextWriter)
WriteAsync(Char) WriteAsync(Char) WriteAsync(Char) WriteAsync(Char)

Writes a character to the text string or stream asynchronously.

(Inherited from TextWriter)
WriteAsync(Char[]) WriteAsync(Char[]) WriteAsync(Char[]) WriteAsync(Char[])

Writes a character array to the text string or stream asynchronously.

(Inherited from TextWriter)
WriteAsync(Char[], Int32, Int32) WriteAsync(Char[], Int32, Int32) WriteAsync(Char[], Int32, Int32) WriteAsync(Char[], Int32, Int32)

Writes a subarray of characters to the text string or stream asynchronously.

(Inherited from TextWriter)
WriteAsync(ReadOnlyMemory<Char>, CancellationToken) WriteAsync(ReadOnlyMemory<Char>, CancellationToken) WriteAsync(ReadOnlyMemory<Char>, CancellationToken) WriteAsync(ReadOnlyMemory<Char>, CancellationToken) Inherited from TextWriter
WriteAsync(String) WriteAsync(String) WriteAsync(String) WriteAsync(String)

Writes a string to the text string or stream asynchronously.

(Inherited from TextWriter)
WriteAsync(StringBuilder, CancellationToken) WriteAsync(StringBuilder, CancellationToken) WriteAsync(StringBuilder, CancellationToken) WriteAsync(StringBuilder, CancellationToken) Inherited from TextWriter
WriteAttribute(String, String) WriteAttribute(String, String) WriteAttribute(String, String) WriteAttribute(String, String)

Writes the specified markup attribute and value to the output stream.

(Inherited from HtmlTextWriter)
WriteAttribute(String, String, Boolean) WriteAttribute(String, String, Boolean) WriteAttribute(String, String, Boolean) WriteAttribute(String, String, Boolean)

Writes the specified markup attribute and value to the output stream, and, if specified, writes the value encoded.

(Inherited from HtmlTextWriter)
WriteBeginTag(String) WriteBeginTag(String) WriteBeginTag(String) WriteBeginTag(String)

Writes any tab spacing and the opening tag of the specified markup element to the output stream.

(Inherited from HtmlTextWriter)
WriteBreak() WriteBreak() WriteBreak() WriteBreak()

Writes a br element to the cHTML output stream.

WriteEncodedText(String) WriteEncodedText(String) WriteEncodedText(String) WriteEncodedText(String)

Encodes the specified text for the requesting device, and then writes it to the output stream.

WriteEncodedUrl(String) WriteEncodedUrl(String) WriteEncodedUrl(String) WriteEncodedUrl(String)

Encodes the specified URL, and then writes it to the output stream. The URL might include parameters.

(Inherited from HtmlTextWriter)
WriteEncodedUrlParameter(String) WriteEncodedUrlParameter(String) WriteEncodedUrlParameter(String) WriteEncodedUrlParameter(String)

Encodes the specified URL parameter for the requesting device, and then writes it to the output stream.

(Inherited from HtmlTextWriter)
WriteEndTag(String) WriteEndTag(String) WriteEndTag(String) WriteEndTag(String)

Writes any tab spacing and the closing tag of the specified markup element.

(Inherited from HtmlTextWriter)
WriteFullBeginTag(String) WriteFullBeginTag(String) WriteFullBeginTag(String) WriteFullBeginTag(String)

Writes any tab spacing and the opening tag of the specified markup element to the output stream.

(Inherited from HtmlTextWriter)
WriteLine() WriteLine() WriteLine() WriteLine()

Writes a line terminator string to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Boolean) WriteLine(Boolean) WriteLine(Boolean) WriteLine(Boolean)

Writes any pending tab spacing and the text representation of a Boolean value, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Char) WriteLine(Char) WriteLine(Char) WriteLine(Char)

Writes any pending tab spacing and a Unicode character, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Char[]) WriteLine(Char[]) WriteLine(Char[]) WriteLine(Char[])

Writes any pending tab spacing and an array of Unicode characters, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Char[], Int32, Int32) WriteLine(Char[], Int32, Int32) WriteLine(Char[], Int32, Int32) WriteLine(Char[], Int32, Int32)

Writes any pending tab spacing and a subarray of Unicode characters, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Decimal) WriteLine(Decimal) WriteLine(Decimal) WriteLine(Decimal)

Writes the text representation of a decimal value followed by a line terminator to the text string or stream.

(Inherited from TextWriter)
WriteLine(Double) WriteLine(Double) WriteLine(Double) WriteLine(Double)

Writes any pending tab spacing and the text representation of a double-precision floating-point number, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Int32) WriteLine(Int32) WriteLine(Int32) WriteLine(Int32)

Writes any pending tab spacing and the text representation of a 32-byte signed integer, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Int64) WriteLine(Int64) WriteLine(Int64) WriteLine(Int64)

Writes any pending tab spacing and the text representation of a 64-byte signed integer, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(Object) WriteLine(Object) WriteLine(Object) WriteLine(Object)

Writes any pending tab spacing and the text representation of an object, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>) WriteLine(ReadOnlySpan<Char>) Inherited from TextWriter
WriteLine(Single) WriteLine(Single) WriteLine(Single) WriteLine(Single)

Writes any pending tab spacing and the text representation of a single-precision floating-point number, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(String) WriteLine(String) WriteLine(String) WriteLine(String)

Writes any pending tab spacing and a text string, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(String, Object) WriteLine(String, Object) WriteLine(String, Object) WriteLine(String, Object)

Writes any pending tab spacing and a formatted string containing the text representation of an object, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(String, Object, Object) WriteLine(String, Object, Object) WriteLine(String, Object, Object) WriteLine(String, Object, Object)

Writes any pending tab spacing and a formatted string that contains the text representation of two objects, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object) WriteLine(String, Object, Object, Object)

Writes out a formatted string and a new line, using the same semantics as Format(String, Object).

(Inherited from TextWriter)
WriteLine(String, Object[]) WriteLine(String, Object[]) WriteLine(String, Object[]) WriteLine(String, Object[])

Writes any pending tab spacing and a formatted string that contains the text representation of an object array, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(StringBuilder) WriteLine(StringBuilder) WriteLine(StringBuilder) WriteLine(StringBuilder) Inherited from TextWriter
WriteLine(UInt32) WriteLine(UInt32) WriteLine(UInt32) WriteLine(UInt32)

Writes any pending tab spacing and the text representation of a 4-byte unsigned integer, followed by a line terminator string, to the output stream.

(Inherited from HtmlTextWriter)
WriteLine(UInt64) WriteLine(UInt64) WriteLine(UInt64) WriteLine(UInt64)

Writes the text representation of an 8-byte unsigned integer followed by a line terminator to the text string or stream.

(Inherited from TextWriter)
WriteLineAsync() WriteLineAsync() WriteLineAsync() WriteLineAsync()

Writes a line terminator asynchronously to the text string or stream.

(Inherited from TextWriter)
WriteLineAsync(Char) WriteLineAsync(Char) WriteLineAsync(Char) WriteLineAsync(Char)

Writes a character followed by a line terminator asynchronously to the text string or stream.

(Inherited from TextWriter)
WriteLineAsync(Char[]) WriteLineAsync(Char[]) WriteLineAsync(Char[]) WriteLineAsync(Char[])

Writes an array of characters followed by a line terminator asynchronously to the text string or stream.

(Inherited from TextWriter)
WriteLineAsync(Char[], Int32, Int32) WriteLineAsync(Char[], Int32, Int32) WriteLineAsync(Char[], Int32, Int32) WriteLineAsync(Char[], Int32, Int32)

Writes a subarray of characters followed by a line terminator asynchronously to the text string or stream.

(Inherited from TextWriter)
WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken) WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken) WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken) WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken) Inherited from TextWriter
WriteLineAsync(String) WriteLineAsync(String) WriteLineAsync(String) WriteLineAsync(String)

Writes a string followed by a line terminator asynchronously to the text string or stream.

(Inherited from TextWriter)
WriteLineAsync(StringBuilder, CancellationToken) WriteLineAsync(StringBuilder, CancellationToken) WriteLineAsync(StringBuilder, CancellationToken) WriteLineAsync(StringBuilder, CancellationToken) Inherited from TextWriter
WriteLineNoTabs(String) WriteLineNoTabs(String) WriteLineNoTabs(String) WriteLineNoTabs(String)

Writes a string, followed by a line terminator string, to the output stream. This method ignores any specified tab spacing.

(Inherited from HtmlTextWriter)
WriteStyleAttribute(String, String) WriteStyleAttribute(String, String) WriteStyleAttribute(String, String) WriteStyleAttribute(String, String)

Writes the specified style attribute to the output stream.

(Inherited from HtmlTextWriter)
WriteStyleAttribute(String, String, Boolean) WriteStyleAttribute(String, String, Boolean) WriteStyleAttribute(String, String, Boolean) WriteStyleAttribute(String, String, Boolean)

Writes the specified style attribute and value to the output stream, and encodes the value, if specified.

(Inherited from HtmlTextWriter)
WriteUrlEncodedString(String, Boolean) WriteUrlEncodedString(String, Boolean) WriteUrlEncodedString(String, Boolean) WriteUrlEncodedString(String, Boolean)

Writes the specified string, encoding it according to URL requirements.

(Inherited from HtmlTextWriter)

Fields

CoreNewLine CoreNewLine CoreNewLine CoreNewLine

Stores the newline characters used for this TextWriter.

(Inherited from TextWriter)
DefaultTabString DefaultTabString DefaultTabString DefaultTabString

Represents a single tab character.

(Inherited from HtmlTextWriter)
DoubleQuoteChar DoubleQuoteChar DoubleQuoteChar DoubleQuoteChar

Represents the quotation mark (") character.

(Inherited from HtmlTextWriter)
EndTagLeftChars EndTagLeftChars EndTagLeftChars EndTagLeftChars

Represents the left angle bracket and slash mark (</) of the closing tag of a markup element.

(Inherited from HtmlTextWriter)
EqualsChar EqualsChar EqualsChar EqualsChar

Represents the equal sign (=).

(Inherited from HtmlTextWriter)
EqualsDoubleQuoteString EqualsDoubleQuoteString EqualsDoubleQuoteString EqualsDoubleQuoteString

Represents an equal sign (=) and a double quotation mark (") together in a string (=").

(Inherited from HtmlTextWriter)
SelfClosingChars SelfClosingChars SelfClosingChars SelfClosingChars

Represents a space and the self-closing slash mark (/) of a markup tag.

(Inherited from HtmlTextWriter)
SelfClosingTagEnd SelfClosingTagEnd SelfClosingTagEnd SelfClosingTagEnd

Represents the closing slash mark and right angle bracket (/>) of a self-closing markup element.

(Inherited from HtmlTextWriter)
SemicolonChar SemicolonChar SemicolonChar SemicolonChar

Represents the semicolon (;).

(Inherited from HtmlTextWriter)
SingleQuoteChar SingleQuoteChar SingleQuoteChar SingleQuoteChar

Represents an apostrophe (').

(Inherited from HtmlTextWriter)
SlashChar SlashChar SlashChar SlashChar

Represents the slash mark (/).

(Inherited from HtmlTextWriter)
SpaceChar SpaceChar SpaceChar SpaceChar

Represents a space ( ) character.

(Inherited from HtmlTextWriter)
StyleEqualsChar StyleEqualsChar StyleEqualsChar StyleEqualsChar

Represents the style equals (:) character used to set style attributes equal to values.

(Inherited from HtmlTextWriter)
TagLeftChar TagLeftChar TagLeftChar TagLeftChar

Represents the opening angle bracket (<) of a markup tag.

(Inherited from HtmlTextWriter)
TagRightChar TagRightChar TagRightChar TagRightChar

Represents the closing angle bracket (>) of a markup tag.

(Inherited from HtmlTextWriter)

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

For a description of this member, see Dispose().

(Inherited from TextWriter)

Applies to

See also