If a web application, how can you figure out the visitor is viewing from a mobile phone?
is it also possible figure out the make/model like blackberry versus iphone?
If a web application, how can you figure out the visitor is viewing from a mobile phone?
is it also possible figure out the make/model like blackberry versus iphone?
You need to check for User Agent.
Like... http://www.developershome.com/wap/detection/detection.asp?page=userAgentHeader
Here is some information from a similar question:
Auto detect mobile browser (via user-agent?)
It involves reading the user-agent header. The answers to that other question include links for scripts for this.
Here is another helpful discussion:
Standard way to detect mobile browsers in a web application based on the http request
Scott Hanselman did a podcast on a module device database that Microsoft made available on Codeplex. It's a .browser file that you put in your ASP.NET (version 2.0+) website, which then helps the framework define the Request.Browser
property more closely. You should be able to get a lot of the information that you need from there.
Even without that, at the least you can check Request.Browser.IsMobileDevice
.
Use http://51degrees.codeplex.com/. It is an ASP.NET open source module which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device. It makes use of WURFL mobile device database. For redirection there is no need to modify existing ASP.NET web application pages.
As preciously stated - user agent
BUT, do you really mean to ask "is it a mobile phone"? Or do you really mean something else?
Lines are blurring these days. I bought a nice little Android slate with 7" screen from eBay for $99. Is that a mobile phone? Is a mini-netbook with 6" screen? Is a Kidnle-like-device?
I'm just wondering why you want to know if it is a mobile 'phone ... screen size? processing power? something else?
You probably did mean mobile 'phone but, if not, please rephrase and we can help further.