
MobileCapabilities | 533
Mobile
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
MobileCapabilities
System.Web.Mobile (system.web.mobile.dll)
.NET 1.1
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 capa-
bilities 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 PreferredRen-
deringMime (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 ErrorHandlerModule : System.Web.IHttpModule {
// Public Constructors
public ErrorHandlerModule();
}
public class MobileCapabilities : System.Web.HttpBrowserCapabilities {
// Public Constructors
public MobileCapabilities();
// Public Static Fields
public static readonly string PreferredRenderingTypeChtml10; // =chtml10 ...