Writes a series of cHTML-specific characters and text to the output stream of an ASP.NET server control. The class provides formatting capabilities that ASP.NET server controls use when rendering cHTML content to clients.
Assembly: System.Web (in System.Web.dll)
Compact HTML, or cHTML, is a subset of HTML 2.0, HTML 3.2, and HTML 4.0, and is designed to render on devices with limited memory and CPU power, along with small display screens, limited formatting capabilities, and a limited number of input options (such as a cell phone touch pad). Therefore, cHTML does not support the following:
Multiple character fonts and styles.
Background colors and images.
The following code example demonstrates how to create a class named CustomChtmlTextWriter that is derived from the class. It creates two constructors and overrides the OnAttributeRender method to prevent the bgcolor style attribute from being written to the output stream of the object. It also creates a class named ChtmlCustomPageAdapter that defines one method, CreateCustomChtmlTextWriter, which creates and returns an instance of the CustomChtmlTextWriter class. The CustomChtmlTextWriter then renders cHTML content for a page to devices with browsers that use cHTML markup.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.