Require IE 5+ or Redirect

  • Thread starter Thread starter Guadala Harry
  • Start date Start date
G

Guadala Harry

I have a bunch of pages that host controls that work only on uplevel
browsers. While most of my users have IE6, I'd like to know how to detect
the browser they are actually connecting with and redirect them to an
alternative page when they connect with a non IE browser.

I googled for this and must not have known the right keywords to use... got
a bunch of stuff about browserhawk and other such nonsense... I thought
there'd be a generally accepted and well-known simple way to do this with
asp.net. I'd sure appreciate some help on this.

Thanks.
 
I have a bunch of pages that host controls that work only on uplevel
browsers. While most of my users have IE6, I'd like to know how to detect
the browser they are actually connecting with and redirect them to an
alternative page when they connect with a non IE browser.

I googled for this and must not have known the right keywords to use... got
a bunch of stuff about browserhawk and other such nonsense... I thought
there'd be a generally accepted and well-known simple way to do this with
asp.net. I'd sure appreciate some help on this.

Thanks.

Hi Harry,
You can use the Request.Browser information to check for this on the server
side. Much easier than javascript.

/Hugo
 
Yes and thank you. I also found the HttpBrowserCapabilities class and
"rolled my own" solution that works great. I knew it had to be easier in
..NET.

-GH
 
the reason you see references to browserhawk and simular, is the the .net
browser detection is so weak. its based solely on the user agent string. (a
header sent by the browser - not the most accurate).

for example, the .net browser detection also does not detect if javascript
is turned off, thus disabling grid paging, hypertext links, etc.


-- bruce (sqlwork.com)
 
Back
Top