3

How can I get the mobile device information if a user is using a web application on a mobile device. I tried this but doesn't really help, it shows Unknown

public class TestController : BaseController
{
    public String IsMobileDevice()
    {            
        if (HttpContext.Request.Browser.IsMobileDevice)
            return String.Format("<H1>{0}</H1>", HttpContext.Request.Browser.MobileDeviceManufacturer);
        else
            return String.Format("<H1>{0}</H1>", Request.Browser.Browser);                
    }
}
RickL
  • 3,318
  • 10
  • 38
  • 39

0 Answers0