By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

How to get browser version

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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 discussion thread is closed

Replies have been disabled for this discussion.