Asp.net does read the browserstring that the browser uses to identify
itself. Note: sometimes the browser does not correctly identify itself
(in Opera you can select how it should identify itself)!
The builtin asp.net controls adjust themselves somewhat to the browser.
See Request.Browser to use the info yourself. The properties of that
object are based on the browserstring. So the Cookies value shows
whether the browser should be able to accept cookies, not if the
current browser has cookies switched off. Same for javascript.
A lot of things can effect compatibility of your html output with browsers.
Most of them have nothing to do with ASP.NET. The major concern is page
layout. Once you start laying out more-or-less non-trivial designs, you will
run into browser differences.
Browser detection is usually a bad idea. Design standards compliant markup,
and go from there.
ASP.net 1.1 could make some pretty crappy HTML. ASP.net 2.0+ is better,
though at times you still may want to not use the default HTML output of the
controls and tweak it yourself.
-Darrel
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.