title: How to detect mobile type and is mobile for a request?
body: <p>I want to detect if a request came from Mobile Device, and if it is, I want to know the Mobile Device Model. When I use android phones, for example, I get wrong values.</p>
  
  <p>I tried using:</p>
  
  <pre><code>System.Web.HttpBrowserCapabilities browser = HttpContext.Current.Request.Browser;
  return browser.IsMobileDevice;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>System.Web.HttpBrowserCapabilities browser = HttpContext.Current.Request.Browser;
  return browser.MobileDeviceModel;
  </code></pre>
  
  <p>but when I use Galaxy S2 or HTC, I get false for IsMobileDevice, and unknown for MobileDeviceModel.</p>
  
  <p>I tried:</p>
  
  <pre><code>System.Web.Mobile.MobileCapabilities mc = (System.Web.Mobile.MobileCapabilities)HttpContext.Current.Request.Browser;
  string deviceModel = mc.MobileDeviceModel;
  string browser = mc.Browser;
  </code></pre>
  
  <p>but it is the same.</p>
  
  <p>how can I detect IsMobile and MobileDeviceModel correctly?</p>