Writes markup characters and text to an ASP.NET server control output stream. This class provides formatting capabilities that ASP.NET server controls use when rendering markup to clients.
See Also: HtmlTextWriter Members
The System.Web.UI.HtmlTextWriter class is used to render HTML 4.0 to desktop browsers. The System.Web.UI.HtmlTextWriter is also the base class for all markup writers in the System.Web.UI namespace, including the System.Web.UI.ChtmlTextWriter, System.Web.UI.Html32TextWriter, and System.Web.UI.XhtmlTextWriter classes. These classes are used to write the elements, attributes, and style and layout information for different types of markup. In addition, these classes are used by the page and control adapter classes that are associated with each markup language.
In most circumstances, ASP.NET automatically uses the appropriate writer for the requesting device. However, if you create a custom text writer or if you want to specify a particular writer to render a page for a specific device, you must map the writer to the page in the controlAdapters section of the application .browser file.