I'm looking for a way to set HttpContext.Current.Request.Browser.IsMobileDevice
to true for custom mobile devices not dedected by MVC4 and 51degrees.mobi, which is also used in application.
I tried this in Global.asax.cs:
protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e)
{
HttpContext.Current.Request.Browser.IsMobileDevice = true;
}
But I got a compile error:
Property or indexer 'System.Web.Configuration.HttpCapabilitiesBase.IsMobileDevice' cannot be assigned to -- it is read only
51degrees.mobi, jquery, jquery-ui and jquery-ui-mobile are used.