This project is read-only.
Getting started
  • Download the latest release
  • Extract the contents of the zip file
  • Create a folder called "Devices" (or any name you desire) in your web applications "App_Browsers" folder. See MSDN article on Application Folders
  • Copy the mobile.browser file into the new "App_Browsers\Devices" folder.
  • Start coding for mobile devices!

A few handy capabilities
  • Request.Browser.IsMobileDevice – To determine if the request is from a mobile device or not.
  • Request.Browser[“SupportsTouchScreen”] – To determine if the device is touch enabled.
    • Tip: Submit buttons are much easier to press on a touch screen whereas anchors take up less space on non-touch devices which typically have smaller screens.
  • Request.Browser.Platform – To determine the devices platform, possible values include “Windows Mobile OS“, “RIM OS”, “iPhone OS” etc.
  • Request.Browser.ScreenPixelsWidth & Request.Browser.ScreenPixelsHeight – To determine the devices screen size.

Last edited Apr 2, 2009 at 9:30 AM by mgagne, version 4


deipec Apr 6, 2010 at 7:46 PM 
How can I treat iPhones like regular browsers when using this solution?

harryhazza77 Jan 5, 2010 at 4:30 PM 
I tried it without a sub folder and got a null reference exception when running the website. This was resolved by moving the file from App_Browsers to App_Browsers\Devices

jensenbox Jan 2, 2010 at 12:33 AM 
Does aspnet_regbrowsers.exe work with this file? if so, it sounds like a much better way to deploy instead of carrying around a 6MB config file in my app and SCM. Plus you update in one place for the entire server.


METROmilwaukee Aug 13, 2009 at 5:37 PM 
1.) Why bother using a subfolder for App_Browsers as suggested?

2.) Request.Browser.IsMobileDevice functions just fine as is but how does the Request object or other code we write know how to find, read and reference the XML files in the App_Browser/Device folder?