Compartilhar via


HtmlWriter members

The HtmlWriter class provides methods that allow you to easily write HTML tags, HTML attribute, and text to an output HTML document.

The HtmlWriter type exposes the following members.

Constructors

  Name Description
Public method HtmlWriter(TextWriter) The HtmlWriter constructor creates a new HtmlWriter object with a specified TextWriter as the output.
Public method HtmlWriter(Stream, Encoding) The HtmlWriter constructor creates a new HtmlWriter object that outputs to a given Stream object using a given encoding.

Top

Properties

  Name Description
Public property WriterState The WriterState property gets an HtmlWriterState enumeration value that indicates what the writer can next write.

Top

Methods

  Name Description
Public method Close The Close() method closes the HtmlWriter instance and releases any resources used by the instance.
Public method Dispose() Releases the resources used by the current instance of the HtmlWriter class.
Protected method Dispose(Boolean) The Dispose(Boolean) method disposes of the HtmlWriter instance.
Public method Flush The Flush method clears all buffers for this HtmlWriter and causes any buffered data to be written to the destination TextWriter object or Stream object that it owns.
Public method WriteAttribute(HtmlAttributeReader) The WriteAttribute(HtmlAttributeReader) method writes an HTML attribute to the output stream.
Public method WriteAttribute(String, String) The WriteAttribute method writes an attribute with the specified name and value.
Public method WriteAttribute(HtmlAttributeId, String) The WriteAttribute writes the attribute specified by an HtmlAttributeId enumeration value.
Public method WriteAttribute(String, [], Int32, Int32) The WriteAttribute method reads an attribute value from a buffer and writes it to the output with a name specified by the name parameter.
Public method WriteAttribute(HtmlAttributeId, [], Int32, Int32) The WriteAttribute method reads an attribute value from a buffer and writes it to the output with the name specified by the id parameter.
Public method WriteAttributeName(String) The WriteAttributeName method writes the specified attribute name to the output.
Public method WriteAttributeName(HtmlAttributeId) The WriteAttributeName method writes the attribute name identified by id to the output.
Public method WriteAttributeName(HtmlAttributeReader) The WriteAttributeName(HtmlAttributeReader) method writes an attribute name to the HTML output stream.
Public method WriteAttributeValue(String) The WriteAttributeValue method writes an attribute value to the output.
Public method WriteAttributeValue(HtmlAttributeReader) The WriteAttributeValue(HtmlAttributeReader) method writes an attribute value to the HTML output stream.
Public method WriteAttributeValue([], Int32, Int32) The WriteAttributeValue method reads an attribute value from a buffer and writes it to the output.
Public method WriteEmptyElementTag(String) The WriteEmptyElementTag method writes an empty element tag to the output.
Public method WriteEmptyElementTag(HtmlTagId) The WriteEmptyElementTag method writes the empty element tag identified by id to the output.
Public method WriteEndTag(String) The WriteEndTag method writes an end tag to the output.
Public method WriteEndTag(HtmlTagId) The WriteEndTag method writes the end tag identified by id to the output.
Public method WriteMarkupText(String) The WriteMarkupText method writes a string containing HTML markup directly to the output, without escaping special characters.
Public method WriteMarkupText(HtmlReader) The WriteMarkupText(HtmlReader) method copies the original content of an HTML element and writes it to the HTML output stream.
Public method WriteMarkupText([], Int32, Int32) The WriteMarkupText method reads HTML from a buffer and writes it directly to the output, without escaping special characters.
Public method WriteStartTag(String) The WriteStartTag method writes a start tag to the output.
Public method WriteStartTag(HtmlTagId) The WriteStartTag method writes the start tag identified by id to the output.
Public method WriteTag The WriteTag(HtmlReader) method copies an HTML element, including attributes, to the HTML output stream.
Public method WriteText(String) The WriteText method writes text to the output.
Public method WriteText(HtmlReader) The WriteText(HtmlReader) method writes the text content of an HTML element to the HTML output stream.
Public method WriteText([], Int32, Int32) The WriteText method reads text from a buffer and writes it to the output.

Top

See also

Reference

HtmlWriter class

Microsoft.Exchange.Data.TextConverters namespace