473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to get browser version

How can I acureatly get the browser type and versin number? I need to send
4X browsers to a different url.

--
mo*******@nospam.com
Nov 18 '05 #1
4 4011
use this..

HttpBrowserCapabilities bc = Request.Browser;
Response.Write("Type = " + bc.Type + "<br>");
Response.Write("Name = " + bc.Browser + "<br>");
Response.Write("Version = " + bc.Version + "<br>");

Av.

Request.Browser
"moondaddy" <mo*******@nospam.com> wrote in message
news:ev*************@TK2MSFTNGP09.phx.gbl...
How can I acureatly get the browser type and versin number? I need to
send
4X browsers to a different url.

--
mo*******@nospam.com

Nov 18 '05 #2
Great thanks! Now there's one more thing I need. Is there a reference
table of the different values that could be returned? Unless I know exactly
what values could be returned, I won't be able to properly test to values to
determin what action to take. In other words, I need to know how to do a
comparison something like this:

If bc.Browser = "Netscape" then
If bc.version < 5 then
'redirect to bad old page
Else
'redirect to good new page
End if
End if

Thanks

--
mo*******@nospam.com
"avnrao" <av*@newsgroups.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
use this..

HttpBrowserCapabilities bc = Request.Browser;
Response.Write("Type = " + bc.Type + "<br>");
Response.Write("Name = " + bc.Browser + "<br>");
Response.Write("Version = " + bc.Version + "<br>");

Av.

Request.Browser
"moondaddy" <mo*******@nospam.com> wrote in message
news:ev*************@TK2MSFTNGP09.phx.gbl...
How can I acureatly get the browser type and versin number? I need to
send
4X browsers to a different url.

--
mo*******@nospam.com


Nov 18 '05 #3
Hi Moondaddy,

Based on my research, I haven't found a certain reference table which
listed all the potential value of the
HttpBrowserCapablilities.Browser member.

Here are some related tech article on this I've found:

#Browser Capabilities Component in ASP.NET
http://www.stardeveloper.com/article...1082501&page=1

#HOW TO: Determine Browser Type in Server-Side Code Without the BrowserType
Object in ASP.NET
http://support.microsoft.com/default...b;EN-US;306576

# ASP.NET Browser issues
http://www.fuzzysoftware.com/default...5&parentID=148
Also, I think you may have a look at the <browserCaps> setting reference in
MSDN which may provide some clues:

#<browserCaps> Element
http://msdn.microsoft.com/library/en...wsercapssectio
n.asp?frame=true

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4

Hi Moondaddy,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Java script Dude | last post by:
To all Mozilla JS Guru's (IE dudes welcome), I have spent the last three years developing complex DHTML applications that must work in IE 5.5sp2+ but I use Mozilla 1.3+** to do all my...
2
by: Aamir Ghanchi | last post by:
Hi, I dont have an AOL browser. If someone has the most recent version, Can they please give me the following info alert("navigator.appName="+navigator.appName+...
8
by: R. Smits | last post by:
I've have got this script, the only thing I want to be changed is the first part. It has to detect IE version 6 instead of just "Microsoft Internet Explorer". Can somebody help me out? I tried...
5
by: David Baker | last post by:
Hi all I am very new to ASP.Net. I am trying to create a sniffer for our program. We want our users to click our sniffer and hopefully the sniffer will check their computer against our...
2
by: Roger Twomey | last post by:
I have an application that checks for browser, version and active X enabled. It uses the result for a simple if then. The issue I have is that Request.Browser.MajorVersion is returning the...
2
by: Craig G | last post by:
is there a way to distinguish whether a client is using IE or Netscape? is there some sorta check i can run on the Page_Load event? or where would be the best place to do this? Cheers, Craig
1
by: Dave Harrington | last post by:
Greetings all - We have a client who uses Lotus Notes as their default e-mail. The version of Lotus they use can run internet explorer windows within Lotus. I'd like to find if they are...
16
by: petermichaux | last post by:
Hi, Does anyone have a a cross-browser setOpacity function that does not use browser sniffing? I looked at the Yahoo! UI function and it detects IE by looking for window.ActiveXObject. I also...
5
by: Mufasa | last post by:
We want to keep track of what OS/Browser people are using for our website. How can I find that out so that I can write it to a DB ? I know how to get it into the DB; I just need to know how to get...
10
by: Conrad Lender | last post by:
In a recent thread in this group, I said that in some cases object detection and feature tests weren't sufficient in the development of cross-browser applications, and that there were situations...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.