XhtmlControlAdapter Class
Note: This API is now obsolete.
Provides a default control adapter for rendering mobile controls in XHTML markup. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site.
System.Web.UI.MobileControls.Adapters::ControlAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlControlAdapter
More...
Assembly: System.Web.Mobile (in System.Web.Mobile.dll)
[ObsoleteAttribute(L"The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] [AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)] [AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)] public ref class XhtmlControlAdapter : public ControlAdapter
The XhtmlControlAdapter type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | XhtmlControlAdapter | Creates a new instance of the XhtmlControlAdapter class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
| Name | Description | |
|---|---|---|
![]() | Control | Returns a strongly typed reference to the associated control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | CssLocation | Indicates whether the style sheet is located as an external physical file, is internal to the current page, is stored in the current session state, or is stored in the application cache. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Device | Returns the device capabilities object associated with the request. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | DocumentType | Indicates the type of XHTML markup used to render the current document. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ItemWeight | Accesses the approximate weight of a single item in the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | Page | Returns the page associated with the device adapter. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | PageAdapter | Gets the page adapter for the page on which the associated control resides. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | SecondaryUIMode | Gets the current secondary UI mode. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Style | Returns the style object associated with the control to which the device adapter is attached. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | StyleSheetLocationAttributeValue | Gets the value of the CssLocation attribute, if it exists, from the form in which it is contained. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | StyleSheetStorageApplicationSetting | Gets the value of the XhtmlCssState configuration setting in the appSettings section of the Web.config file. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | VisibleWeight | Gets or sets the approximate weight of the control, in characters. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
| Name | Description | |
|---|---|---|
![]() | CalculateOptimumPageWeight | Determines the optimum page weight for the device. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | ClearPendingBreakIfDeviceBreaksOnBlockLevel | Clears a pending break if the target device breaks on block elements. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalClearCachedEndTag | Clears the given text writer's current end tag if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalClearPendingBreak | Clears a pending break in the target device if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalEnterFormat | Begins a section with the opening tag and attributes that implement the formats of the specified style, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalEnterLayout | Begins a section with the opening tag and attributes that implement the layout of the specified style, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalEnterStyle(XhtmlMobileTextWriter, Style) | Writes the opening tag for a <span> section, along with attributes that implement the layout and character formatting of the specified style, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalEnterStyle(XhtmlMobileTextWriter, Style, String) | Writes the opening tag of the specified element, along with attributes that implement the layout and character formatting of the specified style, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalExitFormat | Ends a block that has been using the character formatting from a specified style, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalExitLayout | Ends a block that has been using the layout formatting from a specified style, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalExitStyle | Ends a </span> element that has been using the layout and character formatting from a specified style, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalPopPhysicalCssClass | Removes the current cascading style sheet class name from the XhtmlMobileTextWriter object, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalRenderClassAttribute | Puts a class name attribute on the next element to be rendered, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalRenderClosingDivElement | Renders a closing </div> tag if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalRenderClosingSpanElement | Renders a closing </span> element if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalRenderCustomAttribute(XhtmlMobileTextWriter, String) | Gets the value of the attribute with the specified name from the associated control and renders it on the next element with the specified name if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalRenderCustomAttribute(XhtmlMobileTextWriter, String, String) | Includes a custom attribute with the specified name and value in the next element to be rendered, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalRenderOpeningDivElement | Renders an opening tag for a <div> element if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalRenderOpeningSpanElement | Renders an opening tag for a <span> element, if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalSetPendingBreak | Sets a pending break if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | ConditionalSetPendingBreakAfterInline | Sets a pending break after inline elements if certain conditions are met. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | CreateTemplatedUI | Called by a control to create a templated user interface (UI). This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | ExitSecondaryUIMode | Exits any secondary UI mode for the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetCustomAttributeValue(String) | Gets the value of the specified attribute from the markup of the associated control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | GetCustomAttributeValue(MobileControl, String) | Gets the value of the specified attribute from a given control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | GetDefaultLabel | Returns the localized default string for the label control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | HandlePostBackEvent | Returns true if the event was handled. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | LoadAdapterState | Loads view state data specific to this adapter. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Overrides ControlAdapter::LoadAdapterState(Object).) |
![]() | LoadPostData | Returns true if the adapter handles loading the post data. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnInit | Called after an object, such as a form or a page, is initialized. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | OnLoad | Loads data that pertains to a control, a page, or a device adapter. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | OnPreRender | Called by the control's OnPreRender method, to perform adapter-specific work prior to rendering. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | OnUnload | Unloads data that pertains to a control, a page, or a device adapter. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | PreprocessQueryString | Gets the portion of the given query string that contains parameters for processing the request. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | Render(HtmlTextWriter) | Displays the associated control and all of its child controls on the client. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Overrides ControlAdapter::Render(HtmlTextWriter).) |
![]() | Render(XhtmlMobileTextWriter) | Displays the associated control and all of its child controls on the client. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderAsHiddenInputField | Renders hidden field text for a control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderBeginLink(XhtmlMobileTextWriter, String) | Renders the opening tag of a link using the given XhtmlMobileTextWriter and target. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderBeginLink(XhtmlMobileTextWriter, String, String, Style, String) | Renders the opening tag of a link using the given XhtmlMobileTextWriter and target, as well as the given styles or the given cascading style sheet class name. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderBeginLink(XhtmlMobileTextWriter, String, String, Style, String, String) | Renders the opening tag of a link using the given XhtmlMobileTextWriter and target, as well as either the given styles or the given cascading style sheet class name, the access key, and the title text. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderChildren | Renders children of the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Inherited from ControlAdapter.) |
![]() | RenderClosingListTag | Renders a closing tag for a specified list element. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderEndLink | Renders a closing tag (</a>) for a link element. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderOffPageVariables | Renders hidden postback variables for child controls that are not visible due to pagination or secondary UI. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderOpeningListTag | Renders an opening tag for the specified tag name. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderPostBackEventAsAnchor(XhtmlMobileTextWriter, String, String) | Renders a postback event as a link with the specified argument and text. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderPostBackEventAsAnchor(XhtmlMobileTextWriter, String, String, String) | Renders a postback event as a link with the specified argument, text, and access key. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | RenderPostBackEventAsAnchor(XhtmlMobileTextWriter, String, String, String, Style, String) | Renders a postback event as a link with the specified argument, text, and access key, as well as the specified styles or the specified cascading style sheet class name. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
![]() | SaveAdapterState | Saves view-state data specific to this adapter. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. (Overrides ControlAdapter::SaveAdapterState().) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | NotSecondaryUI | A value returned by the SecondaryUIMode property, indicating that the adapter is not currently in secondary UI mode. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site. |
This class provides a base mobile control adapter that renders a control and each of its children in XHTML markup for mobile devices. It also provides helper methods and common properties for derived XHTML mobile control adapters.
Control adapters are components that override certain Control class methods and events to allow browser-specific or markup-specific handling. Much of the adaptability in rendering behavior is encapsulated in the XhtmlTextWriter class. If you are considering whether to build your own control adapter, keep in mind that a single adapter can be used to override a number of browser class behaviors. Alternatively, by including the desired adaptability in a class derived from the XhtmlMobileTextWriter class, you might eliminate the need to use a control adapter.
An adapter for a specific control class applies to all controls that inherit from that class, unless more specialized adapters are present. For example, the XhtmlValidatorAdapter class is used to validate all mobile controls for devices that require or can display XHTML markup.
During processing, the .NET Framework intercepts calls to the methods of a control that are specific to the current target. If a control adapter is associated with the control, the .NET Framework calls the associated adapter methods.
Some properties of a control govern the way it displays across multiple secondary pages for a mobile device. These page are collectively known as secondary UI. The SecondaryUIMode property can be used to define which page will be displayed. The ExitSecondaryUIMode method can be used to remove any secondary UI settings.
Notes to InheritorsWhen you inherit from the XhtmlControlAdapter class, name your adapter for a given control type and markup language in the pattern MarkupControlTypeAdapter (for example, XhtmlTextBoxAdapter). Adapters for a control that provides XHTML markup should be implemented in the System.Web.UI.MobileControls.Adapters.XhtmlAdapters namespace.
Any specialized adapters should be defined for the specialized control under each of the device nodes in the configuration .browser files.
A properly implemented control should not assume that an adapter is attached, or that the attached adapter implements a specific interface. Instead, it should check for these conditions.
A number of conditional rendering methods allow for such conditions as secondary UI and for display devices that require line breaks after every block or after every inline control. Examples of these conditional methods are ConditionalSetPendingBreak and ConditionalEnterLayout. These methods work for a given device regardless of the control being rendered. It is unlikely you would need to override these methods when creating a new control adapter based on this class. At a minimum, you would need to override the Render methods.
Device filtering is required to use a specific adapter for a server control. For more information about device filtering, see Architectural Overview of Adaptive Control Behavior and ASP.NET Device Filtering Overview.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
System.Web.UI.MobileControls.Adapters::ControlAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlControlAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlCalendarAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlCommandAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlFormAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlImageAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlLabelAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlLinkAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlListAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlLiteralTextAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlObjectListAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlPageAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlPanelAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlPhoneCallAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlSelectionListAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlTextBoxAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlTextViewAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlValidationSummaryAdapter
System.Web.UI.MobileControls.Adapters.XhtmlAdapters::XhtmlValidatorAdapter





