Browsers

  • Thread starter Thread starter Paulo
  • Start date Start date
P

Paulo

Can asp.net detect what browser the user is running? Any fix should be done
for each one?
 
The html generated by asp.net should be compatible with all browsers? There
is no need fixing anything? Any articles...
 
After serious thinking Paulo wrote :
Can asp.net detect what browser the user is running? Any fix should be done
for each one?

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.

Hans Kesting
 
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.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Paulo said:
The html generated by asp.net should be compatible with all browsers?
There is no need fixing anything? Any articles...
 
The html generated by asp.net should be compatible with all browsers?
There is no need fixing anything? Any articles...

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
 
Back
Top