How to dedect android in asp .net mvc2 controller

132 views Asked by At

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 customer name from jquery UI autocomplete.

How to dedect Samsung Galaxy tabto render select element insted of autocomplete in this case ?

I tried

HttpContext.Current.Request.Browser.IsMobileDevice

but it returns false for tabloid.

1

There are 1 answers

0
David Savage On BEST ANSWER

For mobile browser detection, you should be using the 51degrees.mobi component, since you are using MVC2.

http://51degrees.codeplex.com/releases/view/85505#DownloadId=365978

You should find examples / documentation at the codeplex site that will show you exactly how to do what you are trying to.