|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Detecting the browser once IE7 comes outI 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 wrote:
Show quoteHide quote > I want to make sure I am doing a browser detection that will work once IE7 The Beta is freely available, and may help you discover other areas> 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 > njsokal***@hotmail.com > http://www.nathansokalski.com/ 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 You could choose to just support up level browsers by setting the
ClientTarget. http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.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: Show quoteHide quote > 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 > njsokal***@hotmail.com > http://www.nathansokalski.com/ 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. Show quoteHide quote "Brennan Stehling" <offwh***@gmail.com> wrote in message news:1160415657.705380.18780@i3g2000cwc.googlegroups.com... > You could choose to just support up level browsers by setting the > ClientTarget. > > http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.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 >> njsokal***@hotmail.com >> http://www.nathansokalski.com/ > > work even once IE7 is available. The basic question my code is [hopefully] UserAgent must contain the following:> asking is "Am I using Internet Explorer or some other browser?" I normally "Mozilla", "MSIE" and "Windows" (MSIE is also available on Mac). -- Happy Hacking, Gaurav Vaish | www.mastergaurav.com www.edujinionline.com http://eduzine.edujinionline.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 Show quoteHide quote "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message news:OpWYc9B7GHA.756@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 > njsokal***@hotmail.com > http://www.nathansokalski.com/ > > "Brennan Stehling" <offwh***@gmail.com> wrote in message > news:1160415657.705380.18780@i3g2000cwc.googlegroups.com... > > You could choose to just support up level browsers by setting the > > ClientTarget. > > > > http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.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 > >> njsokal***@hotmail.com > >> http://www.nathansokalski.com/ > > > > 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. Show quoteHide quote "Jeff" <n***@none.com> wrote in message news:452c6963$0$19736$88260bb3@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" <njsokal***@hotmail.com> wrote in message > news:OpWYc9B7GHA.756@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 >> njsokal***@hotmail.com >> http://www.nathansokalski.com/ >> >> "Brennan Stehling" <offwh***@gmail.com> wrote in message >> news:1160415657.705380.18780@i3g2000cwc.googlegroups.com... >> > You could choose to just support up level browsers by setting the >> > ClientTarget. >> > >> > http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.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 >> >> njsokal***@hotmail.com >> >> http://www.nathansokalski.com/ >> > >> >> > > > > -- > Posted via a free Usenet account from http://www.teranews.com > 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/ =================================== Show quoteHide quote "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message news:OSIUk6b7GHA.1188@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 > njsokal***@hotmail.com > http://www.nathansokalski.com/ > > "Jeff" <n***@none.com> wrote in message news:452c6963$0$19736$88260bb3@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" <njsokal***@hotmail.com> wrote in message >> news:OpWYc9B7GHA.756@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 >>> njsokal***@hotmail.com >>> http://www.nathansokalski.com/ >>> >>> "Brennan Stehling" <offwh***@gmail.com> wrote in message >>> news:1160415657.705380.18780@i3g2000cwc.googlegroups.com... >>> > You could choose to just support up level browsers by setting the >>> > ClientTarget. >>> > >>> > http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.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 >>> >> njsokal***@hotmail.com >>> >> http://www.nathansokalski.com/ >>> > >>> >>> >> >> >> >> -- >> Posted via a free Usenet account from http://www.teranews.com >> > >
Combo Boxes in Datagrids
Experience Request: GPS Application What is the optimal way to upload 10,000 records to Oracle DB? Can we determine at runtime if app is Console or Windows? How to lock a text file? How to debug program error on Windows with another language? Multi-dimensional array - Question on Data types Tab groups in VB2003 debugging Prompting for an IP address Connect to the right SQL Server during runtime |
|||||||||||||||||||||||