This documentation is archived and is not being maintained.

HtmlTextWriter Methods

The methods of the HtmlTextWriter class are listed here. For a complete list of HtmlTextWriter class members, see the HtmlTextWriter Members topic.

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 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: