Detecting the browser once IE7 comes out

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default 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
    [email]njsokalski@hotmail.com[/email]
    [url]http://www.nathansokalski.com/[/url]


    Nathan Sokalski Guest

  2. Similar Questions and Discussions

    1. Detecting when FMS goes down?
      I have read thru the livedocs and I am trying to develop a strategy for determining if an FMS server goes down WITHOUT USING AN SWF. Is there anyway...
    2. CS Browser - colors darken while viewing in browser
      I recently installed Photoshop CS. I set up color management. When I browse a set of images taken with my Sony F717 they appear in the browser (with...
    3. Detecting Flash
      Hi all I have been incorporating flash into a lot of my web pages lately and had a client call me the pother day to find out why he couldnt see...
    4. detecting applications
      Is quickTimeVersion() the only built-in application detection function? I'm looking for a way to detect if a user has acrobat reader or ms...
    5. Detecting mute in osX
      Hi, As one can turn off the speakers, unplug them or set their volume to an inaudible level, a message saying that sounds are available should...
  3. #2

    Default Re: Detecting the browser once IE7 comes out

    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
    > [email]njsokalski@hotmail.com[/email]
    > [url]http://www.nathansokalski.com/[/url]
    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

    Damien Guest

  4. #3

    Default Re: Detecting the browser once IE7 comes out

    You could choose to just support up level browsers by setting the
    ClientTarget.

    [url]http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.aspx[/url]

    You can set it also in the @Page directives.

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

    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
    [url]http://brennan.offwhite.net/blog/[/url]

    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
    > [email]njsokalski@hotmail.com[/email]
    > [url]http://www.nathansokalski.com/[/url]
    Brennan Stehling Guest

  5. #4

    Default Re: Detecting the browser once IE7 comes out

    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
    [email]njsokalski@hotmail.com[/email]
    [url]http://www.nathansokalski.com/[/url]

    "Brennan Stehling" <offwhite@gmail.com> wrote in message
    news:1160415657.705380.18780@i3g2000cwc.googlegrou ps.com...
    > You could choose to just support up level browsers by setting the
    > ClientTarget.
    >
    > [url]http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.aspx[/url]
    >
    > You can set it also in the @Page directives.
    >
    > [url]http://msdn2.microsoft.com/en-us/library/x3k2ssx2.aspx[/url]
    >
    > 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
    > [url]http://brennan.offwhite.net/blog/[/url]
    >
    > 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
    >> [email]njsokalski@hotmail.com[/email]
    >> [url]http://www.nathansokalski.com/[/url]
    >

    Nathan Sokalski Guest

  6. #5

    Default Re: Detecting the browser once IE7 comes out

    > 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 | [url]www.mastergaurav.com[/url]
    [url]www.edujinionline.com[/url]
    [url]http://eduzine.edujinionline.com[/url]
    -----------------------------------------


    Gaurav Vaish \(www.EdujiniOnline.com\) Guest

  7. #6

    Default Re: Detecting the browser once IE7 comes out

    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" <njsokalski@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
    > [email]njsokalski@hotmail.com[/email]
    > [url]http://www.nathansokalski.com/[/url]
    >
    > "Brennan Stehling" <offwhite@gmail.com> wrote in message
    > news:1160415657.705380.18780@i3g2000cwc.googlegrou ps.com...
    > > You could choose to just support up level browsers by setting the
    > > ClientTarget.
    > >
    > > [url]http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.aspx[/url]
    > >
    > > You can set it also in the @Page directives.
    > >
    > > [url]http://msdn2.microsoft.com/en-us/library/x3k2ssx2.aspx[/url]
    > >
    > > 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
    > > [url]http://brennan.offwhite.net/blog/[/url]
    > >
    > > 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
    > >> [email]njsokalski@hotmail.com[/email]
    > >> [url]http://www.nathansokalski.com/[/url]
    > >
    >
    >


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

    Jeff Guest

  8. #7

    Default Re: Detecting the browser once IE7 comes out

    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
    [email]njsokalski@hotmail.com[/email]
    [url]http://www.nathansokalski.com/[/url]

    "Jeff" <none@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" <njsokalski@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
    >> [email]njsokalski@hotmail.com[/email]
    >> [url]http://www.nathansokalski.com/[/url]
    >>
    >> "Brennan Stehling" <offwhite@gmail.com> wrote in message
    >> news:1160415657.705380.18780@i3g2000cwc.googlegrou ps.com...
    >> > You could choose to just support up level browsers by setting the
    >> > ClientTarget.
    >> >
    >> > [url]http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.aspx[/url]
    >> >
    >> > You can set it also in the @Page directives.
    >> >
    >> > [url]http://msdn2.microsoft.com/en-us/library/x3k2ssx2.aspx[/url]
    >> >
    >> > 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
    >> > [url]http://brennan.offwhite.net/blog/[/url]
    >> >
    >> > 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
    >> >> [email]njsokalski@hotmail.com[/email]
    >> >> [url]http://www.nathansokalski.com/[/url]
    >> >
    >>
    >>
    >
    >
    >
    > --
    > Posted via a free Usenet account from [url]http://www.teranews.com[/url]
    >

    Nathan Sokalski Guest

  9. #8

    Default Re: Detecting the browser once IE7 comes out

    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 : [url]http://asp.net.do/faq/[/url]
    foros de asp.net, en español : [url]http://asp.net.do/foros/[/url]
    ===================================
    "Nathan Sokalski" <njsokalski@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
    > [email]njsokalski@hotmail.com[/email]
    > [url]http://www.nathansokalski.com/[/url]
    >
    > "Jeff" <none@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" <njsokalski@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
    >>> [email]njsokalski@hotmail.com[/email]
    >>> [url]http://www.nathansokalski.com/[/url]
    >>>
    >>> "Brennan Stehling" <offwhite@gmail.com> wrote in message
    >>> news:1160415657.705380.18780@i3g2000cwc.googlegrou ps.com...
    >>> > You could choose to just support up level browsers by setting the
    >>> > ClientTarget.
    >>> >
    >>> > [url]http://msdn2.microsoft.com/en-us/library/system.web.ui.page.clienttarget.aspx[/url]
    >>> >
    >>> > You can set it also in the @Page directives.
    >>> >
    >>> > [url]http://msdn2.microsoft.com/en-us/library/x3k2ssx2.aspx[/url]
    >>> >
    >>> > 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
    >>> > [url]http://brennan.offwhite.net/blog/[/url]
    >>> >
    >>> > 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
    >>> >> [email]njsokalski@hotmail.com[/email]
    >>> >> [url]http://www.nathansokalski.com/[/url]
    >>> >
    >>>
    >>>
    >>
    >>
    >>
    >> --
    >> Posted via a free Usenet account from [url]http://www.teranews.com[/url]
    >>
    >
    >

    Juan T. Llibre Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139