Search code examples
asp.netmobile-website

List of UserAgent String Values


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.


Solution

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