Hi, Jeremy.
For helpful info on which features downlevel and uplevel browsers support, see :
http://msdn2.microsoft.com/en-us/library/x3k2ssx2.aspx
As far as detection itself, it's quite simple.
The class System.Web.HttpBrowserCapabilities has a long list
of capabilities you can check for. See the complete list at :
http://www.asp.net/QUICKSTART/util/c...erCapabilities
Select the capabilities you want to test for with Request.Browser
If you want to filter on whether the browser supports CSS, you'd use :
Request.Browser.SupportsCss
i.e.,
If Request.Browser.SupportsCss
'include a CSS style
else
'redirect or do something else
End If
For what you want to do you need to check these capabilities :
1. Whether the requesting browser's MSDomVersion property is version 4.0 or higher.
2. Whether the requesting browser's EcmaScriptVersion property is version 1.2 or higher.
If they both are, you can send them the super duper DHTML menu.
If they are not, you should send them the simpler menu, using only HMTL 3.2.
See a running browser detect sample at :
http://asp.net.do/test/browserDetect.aspx
Juan T. Llibre, asp.net MVP
aspnetfaq.com :
http://www.aspnetfaq.com/
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
===================================
"Jeremy S." <A@B.COM> wrote in message news:%2***************@TK2MSFTNGP05.phx.gbl...
In an ASP.NET 1.1 Web application, how can I detect - with *reasonable* accuracy - whether any
particular browser is a downlevel browser?
My objective is to insert a different menu (different User Control containing a different menu)
for downlevel vs uplevel browsers.
This is very important as I have a great DHTML menu - but on many MACs, it doesn't work even
though the vendor claims to cater to downlevel browsers. So I'm going to generate my own menu for
the downlevel browsers and need a way to determine when to send down the simpler (downlevel) menu
vs the super duper DHTML menu.
Please note that I'm already aware that some geeks out there can force their old or non mainstream
browsers to pretend they're IE (via header mods): but I'm not at all concerned about them. I'm
more concerned about old grandmas with old computers running old browsers (or running iMacs).
Thanks!