This documentation is archived and is not being maintained.

HtmlTextWriter Class

Writes a sequential series of HTML-specific characters and text on a Web Forms page. This class provides formatting capabilities that ASP.NET server controls use when rendering HTML content to clients.

For a list of all members of this type, see HtmlTextWriter Members.


[Visual Basic]
Public Class HtmlTextWriter
   Inherits TextWriter
public class HtmlTextWriter : TextWriter
public __gc class HtmlTextWriter : public TextWriter
public class HtmlTextWriter extends TextWriter

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


This class is commonly used to render HTML to a Web Forms page. Use it as an output stream when you override the Control.Render, WebControl.AddAttributesToRender, and other ASP.NET server control methods that write content to a Web page.


Namespace: System.Web.UI

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: System.Web (in System.Web.dll)

See Also

HtmlTextWriter Members | System.Web.UI Namespace | Html32TextWriter | Control.Render