How to get browser name ?

Posted on 2007-12-03
Medium Priority
Last Modified: 2012-06-27

Is it a possible to know which browser is used by user from asp net using vb2005?

I need to know since I need to set some properties to make aspx form work at  both browser.

Please help.

Thank you.
Question by:emi_sastra
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 16

Accepted Solution

Edwin_C earned 2000 total points
ID: 20400798
You can use the Request object.  Below is the sample from MSDN doc

Dim bc As HttpBrowserCapabilities = Request.Browser
Response.Write("<p>Browser Capabilities:</p>")
Response.Write("Type = " & bc.Type & "<br>")
Response.Write("Name = " & bc.Browser & "<br>")
Response.Write("Version = " & bc.Version & "<br>")
Response.Write("Major Version = " & bc.MajorVersion & "<br>")
Response.Write("Minor Version = " & bc.MinorVersion & "<br>")
Response.Write("Platform = " & bc.Platform & "<br>")
Response.Write("Is Beta = " & bc.Beta & "<br>")
Response.Write("Is Crawler = " & bc.Crawler & "<br>")
Response.Write("Is AOL = " & bc.AOL & "<br>")
Response.Write("Is Win16 = " & bc.Win16 & "<br>")
Response.Write("Is Win32 = " & bc.Win32 & "<br>")
Response.Write("Supports Frames = " & bc.Frames & "<br>")
Response.Write("Supports Tables = " & bc.Tables & "<br>")
Response.Write("Supports Cookies = " & bc.Cookies & "<br>")
Response.Write("Supports VB Script = " & bc.VBScript & "<br>")
Response.Write("Supports JavaScript = " & bc.JavaScript & "<br>")
Response.Write("Supports Java Applets = " & bc.JavaApplets & "<br>")
Response.Write("Supports ActiveX Controls = " & bc.ActiveXControls & "<br>")
Response.Write("CDF = " & bc.CDF & "<br>")

LVL 22

Expert Comment

ID: 20400802
Hi there,
Take a look at this, this is a pretty comprehensive answer to your question



Author Comment

ID: 20400829
Thank you very much.

Expert Comment

ID: 20400836
Request.Browser.Type to fetch the Browser name/type as follows
If (Request.Browser.Type.ToString().Contains("IE6")) Then
            'do something
ElseIf (Request.Browser.Type.ToString().Contains("Firefox")) Then
            'do somthing else
End If

Open in new window


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question