473,465 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Create 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.Browser.Browser.ToUpper() = "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********@hotmail.com
http://www.nathansokalski.com/
Oct 9 '06 #1
7 2979
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.Browser.Browser.ToUpper() = "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********@hotmail.com
http://www.nathansokalski.com/
The Beta is freely available, and may help you discover other areas
where you need to update/amend your site for IE7. Microsoft have also
got various resources for web developers to prepare for IE7, which I
think you can find on the microsoft web site.

Damien

Oct 9 '06 #2
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.Browser.Browser.ToUpper() = "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********@hotmail.com
http://www.nathansokalski.com/
Oct 9 '06 #3
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********@hotmail.com
http://www.nathansokalski.com/

"Brennan Stehling" <of******@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.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.Browser.Browser.ToUpper() = "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********@hotmail.com
http://www.nathansokalski.com/

Oct 10 '06 #4
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
UserAgent must contain the following:

"Mozilla", "MSIE" and "Windows" (MSIE is also available on Mac).

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
Oct 10 '06 #5
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********@hotmail.comwrote in message news:Op*************@TK2MSFTNGP05.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********@hotmail.com
http://www.nathansokalski.com/

"Brennan Stehling" <of******@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.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.Browser.Browser.ToUpper() = "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********@hotmail.com
http://www.nathansokalski.com/



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

Oct 11 '06 #6
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********@hotmail.com
http://www.nathansokalski.com/

"Jeff" <no**@none.comwrote 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********@hotmail.comwrote in message
news:Op*************@TK2MSFTNGP05.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********@hotmail.com
http://www.nathansokalski.com/

"Brennan Stehling" <of******@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegro ups.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.Browser.Browser.ToUpper() = "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********@hotmail.com
http://www.nathansokalski.com/


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

Oct 12 '06 #7
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********@hotmail.comwrote in message
news:OS**************@TK2MSFTNGP05.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********@hotmail.com
http://www.nathansokalski.com/

"Jeff" <no**@none.comwrote 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********@hotmail.comwrote in message
news:Op*************@TK2MSFTNGP05.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********@hotmail.com
http://www.nathansokalski.com/

"Brennan Stehling" <of******@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegr oups.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.Browser.Browser.ToUpper() = "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********@hotmail.com
http://www.nathansokalski.com/

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


Oct 12 '06 #8

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

Similar topics

25
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a...
4
by: Chris | last post by:
When a request comes into a page on my ASP.net site and a session is not found, I want to detect whether the request is an initial request or if the user did have a session going that has now been...
1
by: Sharkbait | last post by:
We are trying to record browser information when a customer comes to our site. I have been able to get most basic browser information using both asp and asp.net. The only thing I’m missing is the...
2
by: Sam-Kiwi | last post by:
I've spent the last 6 months developing a pay-per-download website using ASP.NET Users purchase documents and then download them. The intention is that users are only charged for documents...
3
by: lanem | last post by:
I am working on a ASP.NET 2.0 web site that has some PDFs that users can download. I'm using an HTTP module to see if the user has permission to view the PDF before loading it. This all works...
1
by: Prabhu | last post by:
Hi. We have an ASP.net Web application in which some of the pages are to be served over secure channel using HTTPS. We have built a framework that allows pages to be served over secure channel...
79
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the...
10
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"...
0
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,...
0
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...
0
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,...
0
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...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.