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

Check Client Browser Type

P: n/a
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
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Pulled from 4guys web site
<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
ltlBrowserName.Text = Request.Browser.Type & ", " &
Request.Browser.Platform

ltlAllData.Text = "Type = " & Request.Browser.Type & "<br>"
ltlAllData.Text &= "Name = " & Request.Browser.Browser & "<br>"
ltlAllData.Text &= "Version = " & Request.Browser.Version & "<br>"
ltlAllData.Text &= "Major Version = " & Request.Browser.MajorVersion &
"<br>"
ltlAllData.Text &= "Minor Version = " & Request.Browser.MinorVersion &
"<br>"
ltlAllData.Text &= "Platform = " & Request.Browser.Platform & "<br>"
ltlAllData.Text &= "Is Beta = " & Request.Browser.Beta & "<br>"
ltlAllData.Text &= "Is Crawler = " & Request.Browser.Crawler & "<br>"
ltlAllData.Text &= "Is AOL = " & Request.Browser.AOL & "<br>"
ltlAllData.Text &= "Is Win16 = " & Request.Browser.Win16 & "<br>"
ltlAllData.Text &= "Is Win32 = " & Request.Browser.Win32 & "<br>"
ltlAllData.Text &= "Supports Frames = " & Request.Browser.Frames &
"<br>"
ltlAllData.Text &= "Supports Tables = " & Request.Browser.Tables &
"<br>"
ltlAllData.Text &= "Supports Cookies = " & Request.Browser.Cookies &
"<br>"
ltlAllData.Text &= "Supports VB Script = " & Request.Browser.VBScript &
"<br>"
ltlAllData.Text &= "Supports JavaScript = " & Request.Browser.JavaScript
& "<br>"
ltlAllData.Text &= "Supports Java Applets = " &
Request.Browser.JavaApplets & "<br>"
ltlAllData.Text &= "CDF = " & Request.Browser.CDF & "<br>"
End Sub
</script>

Your browser is: <asp:literal id="ltlBrowserName" runat="server" />
<p>
<b><u>Here is your browser's information:</u></b><br />
<asp:literal runat="server" id="ltlAllData" />
--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Craig G" <craig.gamble@y_arrasoftware.com> wrote in message
news:et**************@TK2MSFTNGP10.phx.gbl...
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

Nov 19 '05 #2

P: n/a
Here's also a good article

Determining Browser Capabilities in ASP.NET
http://msdn.microsoft.com/asp.net/ar...n/default.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
"Craig G" <craig.gamble@y_arrasoftware.com> wrote in message
news:et**************@TK2MSFTNGP10.phx.gbl...
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

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.