Last post Nov 25, 2009 07:15 PM by rtcary
Nov 24, 2009 11:22 AM|rtcary|LINK
For testing, I have this code in the opening page:
protected void Page_Load(object sender, EventArgs e)
// For debugging
string _tmp = Page.Request.ServerVariables["HTTP_USER_AGENT"].ToString();
_tmp += "<br />" + Request.Browser.IsMobileDevice.ToString();
Email emailer = new Email();
// Check for device
And the email contains
Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16
In App_Browser/devices I have mobile.browser
Is there a way to "dump" what device strings are in IsMobileDevice?
Am I missing something here?
Nov 25, 2009 03:10 AM|jimmy q|LINK
The IsMobileDEvice property does not work for all devices and there are several ways around this.
Some devices will inject a special HTTP header that you can inspect for. This is the case for the iphone and blackberry devices. I am not sure on the Header name but a quick search should yield you the result.
The other more manual method is to manually parse the useragent for key words.
Nov 25, 2009 08:29 AM|SKT_01|LINK
if you use the MDBF the iPod Touch should be detected as a mobile device, i. e. IsMobileDevice is true.
Therefore something else must be wrong in your project.
Nov 25, 2009 07:15 PM|rtcary|LINK
There something wrong: the client's IIS is running on Win 2000, so the .NET update cannot be installed. This creates a problem.