Where can I get the values for Page.Request.Browser.Browser?

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

Where can I find out what values are submitted by different browsers for
Page.Request.Browser.Browser? Thanks.
 
You obviously misunderstood my question. Page.Request.Browser.Browser
returns a String, such as IE for Internet Explorer. I am using this value to
determine what browser the user is using, and in order to do this I
obviously need to know what values different browsers will give. Any ideas
where I can find out what these values are? Thanks.
 
re:
!> Where can I find out what values are submitted by different browsers for Page.Request.Browser.Browser?

Nathan,

In the config\Browsers directory of the .Net Framework 2 :
Drive:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers

There's a set of browser config files, named *.browser
which you can use to build a basic list of values.

Open each .browser file with a pure text editor, and look for the .browser name entries.

For example, Palm's entry is "MyPalm" :

<capability name="browser" value="MyPalm" />

For any other browser not listed there, you'll need to create a .browser file for it.

Here's an article which shows how to create a blackberry.browser file :
http://www.codeproject.com/KB/aspnet/BlackberryASPNET.aspx

If you create a new .browser definition file, you must update the browser definitions assembly :
http://msdn.microsoft.com/en-us/library/ms229858.aspx




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
OK, I guess that answers my question, but based on what I saw when looking
at the files, it's a little confusing as to what value will be returned (for
some, it looked like it was a different value depending on the browser
version). So I would like to ask if there is a more efficient way to do
browser detection? Most of the stuff I have written did not really involve
browser detection, since I have usually concentrated on the server-side
code, and any JavaScript that I did need to write and/or generate was
relatively simple. What technique do most ASP.NET developers use when doing
browser detection (not capabilities detection, just which browser)? Thanks.
 
Back
Top