So....how does this work again

Apr 17, 2009 at 11:27 PM
Despair.com has a poster that says "There are no stupid questions, just inquisitive idiots." Thats a bit how I feel about this questions, but here goes:

How does this file work? Do I have to program against it or does it just automagically alter the response content based on mobile browser type? Can I just drop the mobile.browsers file in the App_Browsers/Devices folder and be good to go? It sounds too good to be true. Thank you for enlightening me.

Developer
Apr 20, 2009 at 1:19 PM
Hi Marc,

You do have to program against the data in the mobile.browser file. You can access this data in ASP.NET via the
Page.Request.Browser property. You can access some capabilities in a type safe manner, via their respective public properties.

Request.Browser.IsMobileDevice

Or, you can index using the name of a capability and get the value of that capability for the current request as a string. For some
capabilities, you may need to convert that string yourself to the right type.

Request.Browser[“AcceptsImageJpeg”]

Please take a look at the
Getting Started and Capability Documentation pages also.

I hope I was able to answer your question.
-
-
Vlad