Reputation: 103358
I'm currently testing an ASP.NET Web Application on the "Opera Mobile" emulator.
I've got the following code for testing purposes:
Response.Write(Request.Browser.IsMobileDevice)
This is returning False
Are there emulators which act exactly like a mobile browser, so that this would return True
?
It would be a bit of a pain if I have to release the application each time so that I can access it on my actual mobile phone.
Upvotes: 3
Views: 1299
Reputation: 129
You might consider using this component:
https://github.com/51Degrees/dotNET-Device-Detection
It detects mobile browsers far more reliable than the built in detection in .NET
Upvotes: 1
Reputation: 2873
I don´t recommend you to use IsMobileDevice directly, because his db is not update. Microsoft launched mdbf, but now it´s abandoned.
You could override it using WURFL or 51degrees. But if you don´t need browser capabilities and you only need to know if it´s mobile device then you can use this script.
Upvotes: 2