Click or drag to resize

BrowserInfoForceDeviceClass Method

Override the class's standard device determination DeviceClass logic and force the application to render for the specified DeviceClass. A call to this method will override the internal logic used in IsMobile, IsTablet, and GetDeviceClass to use the specified setting. You can clear the override and restore standard device determination by passing zero as the deviceClass.

It is strongly recommended that this method be called only at application startup (presumably in a startup application extension) and that the DeviceClass not be changed later in the session life-cycle. Changing the DeviceClass later in the session life-cycle could have various side effects such as links becoming invalid (e.g. link is rendered for Computer on one request, but when the link is clicked the link is invalid because the DeviceClass has been changed to Mobile which is typically more restrictive). If changing the DeviceClass later in the session is required, it is strongly recommended that a full page refresh be performed.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public void ForceDeviceClass(
	DeviceClass deviceClass
)

Parameters

deviceClass
Type: NetQuarryDeviceClass
The desired device class, or zero to restore standard detection.
See Also