Solved

How to get browser name ?

Posted on 2007-12-03
4
1,774 Views
Last Modified: 2012-06-27
Hi,

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.
0
Comment
Question by:emi_sastra
4 Comments
 
LVL 16

Accepted Solution

by:
Edwin_C earned 500 total points
Comment Utility
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>")
   

0
 
LVL 22

Expert Comment

by:RedKelvin
Comment Utility
Hi there,
Take a look at this, this is a pretty comprehensive answer to your question

http://www.codeproject.com/KB/aspnet/browsercaps.aspx

RedK
0
 
LVL 1

Author Comment

by:emi_sastra
Comment Utility
Thank you very much.
0
 
LVL 5

Expert Comment

by:pavaneeshkumar
Comment Utility
use
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

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now