views:

317

answers:

3

Hello,

I am trying to determine what kind of interface to show to a user. If a user is visiting my site with a touch screen phone, I want to show them one interface, otherwise, I want to show them another.

Does anyone know of a list of UserAgent string values so I can do this check? I know I can check for the iPhone using the following code in ASP.NET:

Request.UserAgent.IndexOf("iPhone", StringComparison.OrdinalIgnoreCase)

However, I would really like to find a list for other similar phones like

Palm Pre Blackberry Thunder etc.

+4  A: 

The Mobile Device Browser File might be of some help. Example: http://www.hanselman.com/blog/MixMobileWebSitesWithASPNETMVCAndTheMobileBrowserDefinitionFile.aspx

John Sheehan
This solution is very well-done.
Nissan Fan
Also has the advantage that it gives you a full set of capabilites for the devices, which is something that the user agent string doesn't.
Zhaph - Ben Duguid
A: 

I prefer WURFL, it is most up date database. And you can use .NET API Marg.Wurfl.

fravelgue
A: 

Hello

We are using http://www.51degrees.mobi/Products/NETMobileAPI/tabid/86/Default.aspx it is free open source asp.net mobile api which helps is tracking whether request is coming from mobile devices and redirects user to mobile optimized .aspx pages without changing any existing web pages. It makes use of WURFL the most upto date mobile device database. Along with this it also gives you detailed capability information of mobile device making request which you can use to customize pages for each mobile device.

With this you can have same web address for both current and mobile websites.

Amit Patel