473,811 Members | 4,039 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting the browser once IE7 comes out

I want to make sure I am doing a browser detection that will work once IE7
is released. My current detection statement (written using VB.NET) is:
If Me.Request.Brow ser.Browser.ToU pper() = "IE" Then
'Code to use for Internet Explorer browsers
Else
'Code to use for browsers other than Internet Explorer
End If
In what ways would I need to modify this to make it work for IE7 as well?
Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Oct 9 '06
10 1416
re:
Whether this will affect the detection code, I can't remember.
Nathan,

Request.Browser .Type returns "IE7".
Request.Browser .Browser + Request.Browser .Version returns "IE7.0".

You can use either of those to detect IE 7.0.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:OS******** ******@TK2MSFTN GP05.phx.gbl...
That is good to know, but I seem to remember the beta versions (or at least some of them) using a
different UserAgent string than what the final version will. Whether this will affect the
detection code, I can't remember.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Jeff" <no**@none.comw rote in message news:45******** *************** @free.teranews. com...
>I'm using pretty much that exact code and have a Vista Beta 2 machine for testing and the server
detects the IE7 running on the
Vista machine just fine (although I don't have the Upper specification and it still works).

By the way, IE7 beta is already out for use with XP (but it won't work with W2K from what I
gather), so you don't even need a vista
machine to test it.

Jeff

"Nathan Sokalski" <nj********@hot mail.comwrote in message
news:Op******* ******@TK2MSFTN GP05.phx.gbl...
>>My original question had nothing to do with whether or not I support up
level browsers (I am not usually specific to what browser is being used for
anything other than whether it uses JScript of JavaScript). My original
question was how to detect whether I am using IE with a method that will
work even once IE7 is available. The basic question my code is [hopefully]
asking is "Am I using Internet Explorer or some other browser?" I normally
do assume my visitors are using an up level browser, because anybody using a
browser that old really doesn't care whether or not the page works.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Brennan Stehling" <of******@gmail .comwrote in message
news:11****** *************** @i3g2000cwc.goo glegroups.com.. .
You could choose to just support up level browsers by setting the
ClientTarget .

http://msdn2.microsoft.com/en-us/lib...enttarget.aspx

You can set it also in the @Page directives.

http://msdn2.microsoft.com/en-us/library/x3k2ssx2.aspx

You would set it to "uplevel" to assume up level support. Since more
than 98% of your traffic will likely be coming from browsers which are
now "up level", you may find that is reasonable most of the time. It
is unlikely you will see IE4 or Netscape 4 browsers hitting your
website at all.

In fact, "up level" describes nearly all browsers released in the last
5 years which all have Cookie, CSS and Javascript support. A new
definition for Web 2.0 may need to be introduced with a wider set of
properties detailing features expected of this next level.

Brennan Stehling
http://brennan.offwhite.net/blog/

Nathan Sokalski wrote:
I want to make sure I am doing a browser detection that will work once
IE7
is released. My current detection statement (written using VB.NET) is:
If Me.Request.Brow ser.Browser.ToU pper() = "IE" Then
'Code to use for Internet Explorer browsers
Else
'Code to use for browsers other than Internet Explorer
End If
In what ways would I need to modify this to make it work for IE7 as well?
Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

--
Posted via a free Usenet account from http://www.teranews.com


Oct 12 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
4126
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var op = '<SCRIPT language=Javascript' op += 'src="js_pop-op.js" type="text/javascript">' op += '</SCRIPT>' if (navigator.userAgent.indexOf('Opera') != -1 ) {
1
2469
by: Phil Townsend | last post by:
How does one detect for Internet Explorer on Windows CE? Does Request.Browser.Browser return anything unique for IE CE? I have a strange situation where I need to develop a user interface to a web app for CE, but at the moment I do not have a pocket device on which to test it. Anything else i should be aware of? Thanks! *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
2
1532
by: Sergey Poberezovskiy | last post by:
Hi, Simple question: I developed an ASP.Net application that runs under IE. Now for all other browsers I display a message that the application runs under IE: If Not System.Web.HttpContextCurrent.Request.Browser.Type.ToUpper
4
6962
by: mammen | last post by:
Hello, I'm writing trace log of various actions happening in my ASP.NET web application by opening a text file when the user logs in to the system and closing the file while the user logs out. This is especially to nail a hangout issue. The problem I'm facing is, when the application hangs and the user closes the browser using close(X) button I'm not able to close the text file(handle). This keeps the file handle open and the contents...
5
13708
by: Dag Sunde | last post by:
Is it possible to detect if the user minimizes the browser-window? I do some polling, and want to stop it while the window in minimized, but not when it only is blurred... TIA... -- Dag.
7
3004
by: Nathan Sokalski | last post by:
I want to make sure I am doing a browser detection that will work once IE7 is released. My current detection statement (written using VB.NET) is: If Me.Request.Browser.Browser.ToUpper() = "IE" Then 'Code to use for Internet Explorer browsers Else 'Code to use for browsers other than Internet Explorer End If
1
2321
by: Mango | last post by:
I'm trying to print some text in a very specific position on a page, so that it will show through the window of an envelope when folded. This is easy to do, as long as the browser's print margins are set to 0, or I subtract the width of the margins from the position of the text. My question is: is there a technique for detecting browser print margins? It'd be nice not to have to warn users to set them to something specific.
3
1345
by: Grzegorz Klimsa | last post by:
Hello I have problem with ASP.NET in C# language. I prepare two files of css style, one for ie ,second for firefox I want to set css style file depends on browser type I know how pull out info about sort of browser from browser (using Request.Browser.Type), but i have problem, how to load css file after execute Request.Browser.Type method in head
0
9724
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
9604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10379
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...
0
9201
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
7665
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
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.