SPMobileUtility.IsMobilePageRequest Method

Returns a value that indicates whether the mobile version of the request page should be returned.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Shared Function IsMobilePageRequest ( _
    context As HttpContext, _
    capabilities As HttpCapabilitiesBase _
) As Boolean
'Usage
Dim context As HttpContext
Dim capabilities As HttpCapabilitiesBase
Dim returnValue As Boolean

returnValue = SPMobileUtility.IsMobilePageRequest(context, _
    capabilities)
public static bool IsMobilePageRequest(
    HttpContext context,
    HttpCapabilitiesBase capabilities
)

Parameters

Return Value

Type: System.Boolean
true if the mobile version of the page should be returned; otherwise, false.

Remarks

If automatic redirection is enabled, requests from mobile devices get the mobile version of the page unless ?mobile=0 has been appended to the URL. A request from a nonmobile browser gets the mobile version if ?mobile=1 has been appended to the URL.

See Also

Reference

SPMobileUtility Class

SPMobileUtility Members

Microsoft.SharePoint.Utilities Namespace