DekGenius.com
[ Team LiB ] Previous Section Next Section

MobileCapabilities.NET 1.1

System.Web.Mobile (system.web.mobile.dll)class

The MobileCapabilities class extends the System.Web.HttpBrowserCapabilities class with a large number of strongly typed read-only properties that provide information about the capabilities of the client browser. Most of these properties are Boolean (like the various "Supports," "Requires," and "Renders" properties), although some map to simple strings. Examples of the latter include Browser (which might return "Pocket IE," "Microsoft Explorer," "Nokia," "Phone.com," "Ericsson," or "i-mode") and PreferredRenderingMime (which indicates the device's desired MIME type, like "text/html"). ASP.NET automatically examines some of these properties to customize the output it renders.

To access a MobileCapabilities for the current client, examine the System.Web.HttpRequest.Browser property. You will need to cast the object to the MobileCapabilities type.

public class MobileCapabilities : System.Web.HttpBrowserCapabilities {
// Public Constructors
   public MobileCapabilities( );
// Public Static Fields
   public static readonly string PreferredRenderingTypeChtml10;    // =chtml10
   public static readonly string PreferredRenderingTypeHtml32;    // =html32
   public static readonly string PreferredRenderingTypeWml11;    // =wml11
   public static readonly string PreferredRenderingTypeWml12;    // =wml12
// Public Instance Properties
   public virtual bool CanCombineFormsInDeck{get; }
   public virtual bool CanInitiateVoiceCall{get; }
   public virtual bool CanRenderAfterInputOrSelectElement{get; }
   public virtual bool CanRenderEmptySelects{get; }
   public virtual bool CanRenderInputAndSelectElementsTogether{get; }
   public virtual bool CanRenderMixedSelects{get; }
   public virtual bool CanRenderOneventAndPrevElementsTogether{get; }
   public virtual bool CanRenderPostBackCards{get; }
   public virtual bool CanRenderSetvarZeroWithMultiSelectionList{get; }
   public virtual bool CanSendMail{get; }
   public virtual int DefaultSubmitButtonLimit{get; }
   public virtual int GatewayMajorVersion{get; }
   public virtual double GatewayMinorVersion{get; }
   public virtual string GatewayVersion{get; }
   public virtual bool HasBackButton{get; }
   public virtual bool HidesRightAlignedMultiselectScrollbars{get; }
   public virtual string InputType{get; }
   public virtual bool IsColor{get; }
   public virtual bool IsMobileDevice{get; }
   public virtual int MaximumRenderedPageSize{get; }
   public virtual int MaximumSoftkeyLabelLength{get; }
   public virtual string MobileDeviceManufacturer{get; }
   public virtual string MobileDeviceModel{get; }
   public virtual int NumberOfSoftkeys{get; }
   public virtual string PreferredImageMime{get; }
   public virtual string PreferredRenderingMime{get; }
   public virtual string PreferredRenderingType{get; }
   public virtual bool RendersBreakBeforeWmlSelectAndInput{get; }
   public virtual bool RendersBreaksAfterHtmlLists{get; }
   public virtual bool RendersBreaksAfterWmlAnchor{get; }
   public virtual bool RendersBreaksAfterWmlInput{get; }
   public virtual bool RendersWmlDoAcceptsInline{get; }
   public virtual bool RendersWmlSelectsAsMenuCards{get; }
   public virtual string RequiredMetaTagNameValue{get; }
   public virtual bool RequiresAttributeColonSubstitution{get; }
   public virtual bool RequiresContentTypeMetaTag{get; }
   public virtual bool RequiresDBCSCharacter{get; }
   public virtual bool RequiresHtmlAdaptiveErrorReporting{get; }
   public virtual bool RequiresLeadingPageBreak{get; }
   public virtual bool RequiresNoBreakInFormatting{get; }
   public virtual bool RequiresOutputOptimization{get; }
   public virtual bool RequiresPhoneNumbersAsPlainText{get; }
   public virtual bool RequiresSpecialViewStateEncoding{get; }
   public virtual bool RequiresUniqueFilePathSuffix{get; }
   public virtual bool RequiresUniqueHtmlCheckboxNames{get; }
   public virtual bool RequiresUniqueHtmlInputNames{get; }
   public virtual bool RequiresUrlEncodedPostfieldValues{get; }
   public virtual int ScreenBitDepth{get; }
   public virtual int ScreenCharactersHeight{get; }
   public virtual int ScreenCharactersWidth{get; }
   public virtual int ScreenPixelsHeight{get; }
   public virtual int ScreenPixelsWidth{get; }
   public virtual bool SupportsAccesskeyAttribute{get; }
   public virtual bool SupportsBodyColor{get; }
   public virtual bool SupportsBold{get; }
   public virtual bool SupportsCacheControlMetaTag{get; }
   public virtual bool SupportsCss{get; }
   public virtual bool SupportsDivAlign{get; }
   public virtual bool SupportsDivNoWrap{get; }
   public virtual bool SupportsEmptyStringInCookieValue{get; }
   public virtual bool SupportsFontColor{get; }
   public virtual bool SupportsFontName{get; }
   public virtual bool SupportsFontSize{get; }
   public virtual bool SupportsImageSubmit{get; }
   public virtual bool SupportsIModeSymbols{get; }
   public virtual bool SupportsInputIStyle{get; }
   public virtual bool SupportsInputMode{get; }
   public virtual bool SupportsItalic{get; }
   public virtual bool SupportsJPhoneMultiMediaAttributes{get; }
   public virtual bool SupportsJPhoneSymbols{get; }
   public virtual bool SupportsQueryStringInFormAction{get; }
   public virtual bool SupportsRedirectWithCookie{get; }
   public virtual bool SupportsSelectMultiple{get; }
   public virtual bool SupportsUncheck{get; }
// Public Instance Methods
   public bool HasCapability(string delegateName, string optionalParameter);
}

Hierarchy

System.Object System.Web.Configuration.HttpCapabilitiesBase System.Web.HttpBrowserCapabilities MobileCapabilities

Returned By

System.Web.UI.MobileControls.Adapters.ControlAdapter.Device, System.Web.UI.MobileControls.Adapters.MobileTextWriter.Device, System.Web.UI.MobileControls.MobilePage.Device

Passed To

System.Web.UI.MobileControls.Adapters.ChtmlMobileTextWriter.ChtmlMobileTextWriter( ), System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter.HtmlMobileTextWriter( ), System.Web.UI.MobileControls.Adapters.MobileTextWriter.MobileTextWriter( ), System.Web.UI.MobileControls.Adapters.UpWmlMobileTextWriter.UpWmlMobileTextWriter( ), System.Web.UI.MobileControls.Adapters.WmlMobileTextWriter.WmlMobileTextWriter( )

    [ Team LiB ] Previous Section Next Section