Assembly: System.Web.Mobile (in system.web.mobile.dll)
XHTML is an XML-compliant markup that is based on HTML 4.1 and allows you to create Web sites suitable for multiple device types. It merges HTML's ease of use with XML's strict element guidelines to produce a markup language with a wide range of format and style options and reduced markup tag ambiguity. This class provides formatting capabilities that ASP.NET server controls use when rendering XHTML content to clients. The XhtmlMobileTextWriter renders markup that meets the standards of three different XHTML doc types: XHTML Basic, which supports limited style and format elements; XHTML Mobile Profile, which supports inline style sheets; and WML 2.0, which is based on XHTML 1.1 and supports cascading style sheets.
This class is used primarily by developers of custom mobile page and control adapters.
The XhtmlMobileTextWriter class can render all HTML elements, attributes, and style attributes, but, unlike the HtmlTextWriter class, does not allow title capitalization of these markup elements.
An XhtmlPageAdapter instantiates an XhtmlMobileTextWriter and depending on the capabilities of the target device, initializes a number of properties, such as SupportsNoWrapStyle, SuppressNewLine, and UseDivsForBreaks, that assist the text writer in rendering the page and its controls.
Your adapter can use a variety of methods to apply styles and control formatting:
You can use the members of this class, and any members it inherits from the MobileTextWriter class, to create custom text writers to use in a custom XHTML page or in class adapters. You can also create new derived classes that override the standard behavior of the XhtmlMobileTextWriter class.
Device filtering is required in order to use a specific adapter or text writer for a server control. For more information about device filtering, see Architectural Overview of Adaptive Rendering and Introduction to Device Filtering in ASP.NET.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Other ResourcesASP.NET and XHTML Compliance
Architectural Overview of Adaptive Rendering
Introduction to Device Filtering in ASP.NET