Mad coder.
Mad coder.

Reputation: 2175

How to detect client is on computer or mobile?

In ASP.NET with C# to redirect page to Normal version or Mobile version how can I detect whether client is in computer browser or mobile phone browser?

Also how to detect mobile phone's screen resolution.

Upvotes: 2

Views: 4074

Answers (2)

reshma k
reshma k

Reputation: 544

u can check it with

 Request.Browser.IsMobileDevice

also check following link

C# .NET Checking if browser is mobile - what is the most reliable way?

Upvotes: 1

Jordan
Jordan

Reputation: 2758

You can use

Request.Browser.IsMobileDevice

Also I don't believe you can get the screen res from the server side.

You can get it with javascript though

screen.width screen.height I suppose you could feed that back in through an ajax call....

Upvotes: 4

Related Questions