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

  • Thread starter Nathan Sokalski
  • Start date
N

Nathan Sokalski

Where can I find out what values are submitted by different browsers for
Page.Request.Browser.Browser? Thanks.
 
N

Nathan Sokalski

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.
 
J

Juan T. Llibre

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
 
N

Nathan Sokalski

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top