IsMobileDevice returns false for iPhone using .NET 3.5
When using .NET 3.5 or earlier you find that you can detect a mobile browser using the following property. However when using new devices such as iPhones the value always returns false.
This is because this version of the .NET framework is not aware of new devices such as iPhones
HttpContext.Current.Request.Browser.IsMobileDevice
For this property to be correctly detected you need to
download the browser definition files from CodePlex and place them in the
app_browsers directory
The IsMobileDevice should now return the correct value.
Comments
Post a Comment