Export (0) Print
Expand All

XhtmlMobileTextWriter Class

Provides text writer functionality for devices targeted by the XHTML adapter set, including Extensible Hypertext Markup Language (XHTML), XHTML Mobile, and Wireless Markup Language (WML).

Namespace: System.Web.UI.MobileControls.Adapters.XhtmlAdapters
Assembly: System.Web.Mobile (in system.web.mobile.dll)

public class XhtmlMobileTextWriter : MobileTextWriter
public class XhtmlMobileTextWriter extends MobileTextWriter
public class XhtmlMobileTextWriter extends MobileTextWriter
Not applicable.

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.

System.Object
   System.MarshalByRefObject
     System.IO.TextWriter
       System.Web.UI.HtmlTextWriter
         System.Web.UI.MobileControls.Adapters.MultiPartWriter
           System.Web.UI.MobileControls.Adapters.MobileTextWriter
            System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter

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

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 Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft