Last post Jun 15, 2006 05:55 PM by DotNetSteve2005
Jun 14, 2006 08:15 AM|Grenville|LINK
Hi I don't know if this is the best place to post this but I was just wondering if anyone knew how C#.NET can detect whether a site is accessed by a standard internet browser or by a mobile phone?
I know it's a bit of a random question but if anyone can shed some light then that would be great!
Or if there is a better forum to post this in then please let me know.
Jun 15, 2006 05:41 PM|DotNetSteve2005|LINK
This is from .Net 2.0 help file:
Browser definition files contain definitions for individual browsers. At run time, ASP.NET uses the information in the request header to determine what type of browser has made the request. Then ASP.NET uses .browser files to determine the capabilities of
the browser, and how to render markup to that browser. This is useful to Web developers who want to create applications that can be viewed on mobile devices, making use of control adapters that adapt the behavior of an ASP.NET Web server control depending
on the type of device.
Look under the headin browser capabilities
Jun 15, 2006 05:55 PM|DotNetSteve2005|LINK
Also from help file:
Query the Browser property, which contains an HttpBrowserCapabilities object. This object gets information from the browser or client device during an HTTP request, telling your application the type and level of support the browser or client device offers.
The object in turn exposes information about browser capabilities using strongly typed properties and a generic name-value dictionary.