locked
How to dedect tabloid in controller RRS feed

  • Question

  • User-1262787652 posted

    I'm using ASP .NET MVC2 and jquery UI Autocomplete.

    Sometimes application runs in Samsung Galaxy Tab.

    In this case it is very difficult to select from jquery UI autocomplete.

    How to dedect Samsung Galaxy tab and render select element in this case ?

    I tried

    HttpContext.Current.Request.Browser.IsMobileDevice

    but it returns false for tab.

    Wednesday, April 11, 2012 8:16 AM

Answers

  • User1849990362 posted

    Try

    Request.Browser["is_tablet"]

    Or

    Request.UserAgent.ToString().Contains("android")

    Also refer this site it has various scripts for detecting mobile browsers for asp.net,jquery etc.

    http://detectmobilebrowsers.com/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 11, 2012 8:19 AM

All replies

  • User1849990362 posted

    Try

    Request.Browser["is_tablet"]

    Or

    Request.UserAgent.ToString().Contains("android")

    Also refer this site it has various scripts for detecting mobile browsers for asp.net,jquery etc.

    http://detectmobilebrowsers.com/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, April 11, 2012 8:19 AM
  • User1943143334 posted

    Hi,

    I think ASP.NET MVC 3 and above has good support for detecting Mobile devices!

    In MVC2, you may have to to do the UserAgent sniffing etc.,

    Hope it helps u...

    Wednesday, April 11, 2012 8:07 PM