This documentation is archived and is not being maintained.

HtmlTextWriter Members

HtmlTextWriter overview

Public Constructors

public constructorHtmlTextWriter Constructor Overloaded. Initializes a new instance of the HtmlTextWriter class.

Public Fields

public fieldstatic (Shared in Visual Basic)DefaultTabString Represents a single tab character.
public fieldstatic (Shared in Visual Basic)DoubleQuoteChar Represents the double-quote (") character.
public fieldstatic (Shared in Visual Basic)EndTagLeftChars Represents the left angle bracket and slash (</) of the closing tag of an HTML element.
public fieldstatic (Shared in Visual Basic)EqualsChar Represents the equal sign (=) character.
public fieldstatic (Shared in Visual Basic)EqualsDoubleQuoteString Represents an equals sign and a double quote character together in a String.
public fieldstatic (Shared in Visual Basic)SelfClosingChars Represents the self-closing slash (/) character of an HTML tag.
public fieldstatic (Shared in Visual Basic)SelfClosingTagEnd Represents the closing slash and right angle bracket (/>) of a self-closing HTML element.
public fieldstatic (Shared in Visual Basic)SemicolonChar Represents the semicolon (;) character.
public fieldstatic (Shared in Visual Basic)SingleQuoteChar Represents a single quote (') character.
public fieldstatic (Shared in Visual Basic)SlashChar Represents the slash (/) character.
public fieldstatic (Shared in Visual Basic)SpaceChar Represents a space character.
public fieldstatic (Shared in Visual Basic)StyleEqualsChar Represents the colon character (:) used to set style attributes equal to values in the opening tag of an HTML element.
public fieldstatic (Shared in Visual Basic)TagLeftChar Represents the opening angle-bracket (<) of an HTML tag.
public fieldstatic (Shared in Visual Basic)TagRightChar Represents the closing angle-bracket (>) of an HTML tag.

Public Properties

public propertyEncoding Overridden. Gets the Encoding that the HtmlTextWriter object uses to write content to the page.
public propertyFormatProvider (inherited from TextWriter) Gets an object that controls formatting.
public propertyIndent Gets or sets the number of spaces to indent at the beginning of a line of HTML.
public propertyInnerWriter Gets or sets the text writer that writes the inner content of the HTML element.
public propertyNewLine Overridden. Gets or sets the line terminator string used by the current HtmlTextWriter.

Public Methods

public methodAddAttribute Overloaded. Adds an HTML attribute and its value to an HtmlTextWriter output stream to be rendered on a client.
public methodAddStyleAttribute Overloaded. Adds an HTML style attribute to the HtmlTextWriter output stream.
public methodClose Overridden. Closes the current HtmlTextWriter and releases any system resources associated with it.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodFlush Overridden. Clears all buffers for the current HtmlTextWriter and causes any buffered data to be written to the text stream.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodRenderBeginTag Overloaded. Writes the opening tag of an HTML element to the HtmlTextWriter output stream.
public methodRenderEndTag Writes the end tag of an HTML element to the HtmlTextWriter output stream.
public methodToString (inherited from Object) Returns a String that represents the current Object.
public methodWrite Overloaded. Overridden. Writes the given data type to an HTML text stream to be rendered to an ASP.NET page.
public methodWriteAttribute Overloaded. Writes an HTML attribute and its value to the HtmlTextWriter output stream.
public methodWriteBeginTag Writes any tab spacing and the opening tag of the specified HTML element to the HtmlTextWriter output stream.
public methodWriteEndTag Writes any tab spacing and the closing tag of the specified HTML element.
public methodWriteFullBeginTag Writes any tab spacing and the opening tag of the specified HTML element to the HtmlTextWriter output stream.
public methodWriteLine Overloaded. Overridden. Writes some data to an HTML text stream, as specified by the overloaded parameters, followed by a line terminator. All instances of this method write tab strings to the text stream.
public methodWriteLineNoTabs Writes a String followed by a line terminator to an HTML text stream. This method ignores any specified tab spacing.
public methodWriteStyleAttribute Overloaded. Writes an HTML style attribute and its value to the HtmlTextWriter output stream.

Protected Fields

protected fieldCoreNewLine (inherited from TextWriter) Stores the new line characters used for this TextWriter.

Protected Properties

protected propertyTagKey Gets or sets the HtmlTextWriterTag value for the specified HTML element.
protected propertyTagName Gets or sets the tag name of the HTML element being rendered.

Protected Methods

protected methodAddAttribute Overloaded. Adds an HTML attribute and its value to an HtmlTextWriter output stream to be rendered on a client.
protected methodAddStyleAttribute Overloaded. Adds an HTML style attribute to the HtmlTextWriter output stream.
protected methodDispose (inherited from TextWriter) Releases the unmanaged resources used by the TextWriter and optionally releases the managed resources.
protected methodEncodeAttributeValue Overloaded. HTML encodes the specified HTML attribute's value.
protected methodEncodeUrl Performs minimal URL encoding by converting spaces passed in the url parameter to %20.
protected methodFilterAttributes Filters all HTML attributes and style attributes by calling HtmlTextWriter.OnAttributeRender and HtmlTextWriter.OnStyleAttributeRender on all properites of the page or ASP.NET server control.
protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodGetAttributeKey Obtains the corresponding HtmlTextWriterAttribute enumeration value for the specified HTML attribute.
protected methodGetAttributeName Obtains the name of the HTML attribute associated with the specified HtmlTextWriterAttribute value.
protected methodGetStyleKey Obtains the HtmlTextWriterStyle enumeration value for the specified HTML style.
protected methodGetStyleName Obtains the HTML style attribute associated with the specified HtmlTextWriterStyle enumeration value.
protected methodGetTagKey Obtains the HtmlTextWriterTag enumeration value associated with the specified HTML element.
protected methodGetTagName Obtains the HTML element associated with the specified HtmlTextWriterTag enumeration value.
protected methodIsAttributeDefined Overloaded. Determines whether an HTML attribute is to be rendered in the next call to the RenderBeginTag method.
protected methodIsStyleAttributeDefined Overloaded. Determines whether an HTML style attribute is rendered during the next call to the RenderBeginTag method.
protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
protected methodOnAttributeRender Determines whether the specified HTML attribute and its value will be rendered to the requesting page.
protected methodOnStyleAttributeRender Determines whether the specified HTML style attribute and its value will be rendered to the requesting page.
protected methodOnTagRender Determines whether the specified HTML element will be rendered to the requesting page.
protected methodOutputTabs Writes a series of blank characters that represent the tab spacing for a line of HTML characters.
protected methodPopEndTag Removes an HTML element from the list of rendered elements.
protected methodPushEndTag Saves the specifed HTML element for a later call to the PopEndTag method.
protected methodstatic (Shared in Visual Basic)RegisterAttribute Registers HTML attributes, whether literals or dynamically generated, from the source file so that they can be properly rendered to the requesting client.
protected methodstatic (Shared in Visual Basic)RegisterStyle Registers HTML style properties, whether literals or dynamically generated, from the source file so that they can be properly rendered to the requesting client.
protected methodstatic (Shared in Visual Basic)RegisterTag Registers HTML tags, whether literals or dynamically generated, from the source file so that they can be properly rendered to the requesting client.
protected methodRenderAfterContent Writes any text or spacing that occurs after the content and before the closing tag of the HTML element to render to the HtmlTextWriter output stream.
protected methodRenderAfterTag Writes any spacing or text that occurs after an HTML element's closing tag.
protected methodRenderBeforeContent Writes any text or spacing before the content and after the opening tag of an HTML element.
protected methodRenderBeforeTag Writes any text or tab spacing that occurs before the opening tag of an HTML element to the HtmlTextWriter output stream.

See Also

HtmlTextWriter Class | System.Web.UI Namespace

Show: