Reputation: 8088
I'm trying to do different things in my application based on whether the machine accessing the web based program is a mobile device such as an Iphone or droid or if it is a desktop or laptop.
Is there a way for me to know if the application is fired off by an iphone or some other mobile device?
Upvotes: 1
Views: 98
Reputation: 64943
You may use the browser capabilities object that comes with HttpRequest object.
Check this article in MSDN:
Upvotes: 2
Reputation: 983
You can get all the info you need from the Request.Browser object.
Good sample code can be found here: http://msdn.microsoft.com/en-us/library/3yekbd5b.aspx
Upvotes: 2