473,720 Members | 2,814 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check Client Browser Type

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
2 8090
Pulled from 4guys web site
<script language="VB" runat="server">
Sub Page_Load(sende r 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="ltlBrowserN ame" 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.c om> wrote in message
news:et******** ******@TK2MSFTN GP10.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
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.c om> wrote in message
news:et******** ******@TK2MSFTN GP10.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

88
12514
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
3
8652
by: Matt | last post by:
<input type="file" size=50"> will produce the browse button and browse text box. The user can either select the file from browse button, or enter a path in browse text box manually. My question is if there are any client-side code to check if the path exists in this case? My understanding is that no client-side solution to this problem. please advise. thanks!!
7
3211
by: lvpaul | last post by:
Hallo ! I am using IIS-Windows-Authentication in my intranet (web.config <authentication mode="Windows" /> <identity impersonate="true" /> How can I get the users (client) IP-Address ? I think the username can be read with user.identity.name.
2
2285
by: yonthebeach | last post by:
hi, i have an upload mechanism on my website and want to check the filesize on the client size. is this possible? thanks yavuz bogazci
5
1671
by: thisis | last post by:
Hi All, Hi All, (this is not the same topic as the my previous topic) What objects/methods/properties does VBScript offer for: Assuring/guarantee/make certain that ASP/VBSCript an ELEMENT - e.g. <img ... / - was FULLY Loaded into web Browser
10
5206
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked. I set the AutoPostBack property of the CheckBox in the Header to True & am invoking a sub named 'CheckAllRows' on the CheckedChanged event of this CheckBox. The CheckBox in the Header exists within the HeaderTemplate of a TemplateColumn in the...
19
107999
Frinavale
by: Frinavale | last post by:
Filtering user input is extremely important for web programming. If input is left unfiltered users can input malicious code that can cripple your website. This article will explain how to make sure that the user only submits a number to your .NET web application and also demonstrate how to add JavaScript to your ASPX pages. Upon popular demand, I have added a section that also covers how to use a validator control to check if a text box...
6
3320
by: Anshul | last post by:
I want to check through perl whether javascript is enabled or disabled in mozilla browser. If it is disabled I want to display a message to user to enable it. What code can I use please help. I tried "navigator.javaEnabled() but it is in javascript again. If javascript will be disabled so browser can neither read this code even. Thanks
7
2572
by: Vishal | last post by:
Hi, I am writing a CGI to serve files to the caller. I was wondering if there is any way to tell in my CGI if the client browser is still connected. If it is not, i want to execute some special code before exiting. Is there any way to do this? Any help on this is appreciated :) Regards,
0
8833
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9365
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9210
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9126
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7998
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4482
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3186
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.