Cross-browser compatibility of Asp.net 2.0

D

dejavue82

Dear Asp.net users,

I have seen some people comment that their asp.net websites render
differently with various web browsers. Are they doing somthing wrong?

In particilar,

1) I am wondering how cross-browser compatible the client code is the
asp.net 2.0 generates.

2) Are there server controls included with asp.net 2.0 that only work
with IE?

3) Does the validation control work without javascript enabled? (If you
visit dell.com and disable javascript, their login form doesn't even
appear! It could well be that they are still using asp.net 1.0.)

I appreciate your time and input.

Regards,

Jim Light
 
M

Mark Rae

I have seen some people comment that their asp.net websites render
differently with various web browsers. Are they doing somthing wrong?

Generally speaking, I don't even bother to verify against anything other
than IE & FireFox on Windows. It's simply not worth the effort since those
two browsers account for 94% of web usage by browser, and Windows
constitutes 92% of web usage by OS.
http://www.thecounter.com/stats/2005/December/browser.php
http://www.thecounter.com/stats/2005/December/os.php

That said, I'm currently in the process of verifying a website against
Safari and FireFox on a Mac. FireFox seems to be fairly OK, but Safari is an
absolute nightmare. Specifically tables seem to size themselves differently,
making layout a real pain. For my own interest, I tried to use Safari on one
of my other sites, and couldn't even log on! FireFox seemed to work fine,
though...
 
D

dejavue82

Thank you very much. Could somebody also respond to my other 2
questions?

2) Are there server controls included with asp.net 2.0 that only work
with IE?

3) Does the validation control work without javascript enabled? (If you

visit dell.com and disable javascript, their login form doesn't even
appear! It could well be that they are still using asp.net 1.0.)
 
J

Juan T. Llibre

re:
2) Are there server controls included with asp.net 2.0 that only work with IE?

They should work with any browser, provided you detect the browser
and send it HTML/javascript it can understand.

Controls can send different output to different browsers.
It's up to you to implement that, though.

re:
3) Does the validation control work without javascript enabled?

All of the validation controls do server side validation, not client-side.
 
D

dejavue82

Hmmm, I thought that Asp.net 2.0 detects the type of browser
automatically and then sends the correct html to that browser, no?
 
J

Juan T. Llibre

No. It has the *capability* to do that.
You have to implement it...and update the necessary files.

Look into sending downlevel/uplevel HTML to browsers,
and make sure you have the correct entries in your web.config or machine.config
( yes, you can still use them ) or write updated *.browser files which cover
the capabilities for the browsers you are intending to target.

The *.browser files should be located at :

drive:\%windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers

Use the samples provided to create your custom *.browser files,
depending on your targeted browser's capabilities.
 
D

dejavue82

Thank you very much for your great response!

To give some background info as to why I'm asking these questions: I am
trying to decide on a web language and would like to stick with which
ever one I choose.

Just to clarify: You are saying that one could either perform the
configurations within the website files (ie. web.config) OR on the
server (ie. .browser)? What impact would this have in a shared hosting
environment?

Again, thanks a lot!

Regards,

Jim Light
 
J

Juan T. Llibre

re:
Just to clarify: You are saying that one could either perform the
configurations within the website files (ie. web.config) OR on the
server (ie. .browser)?

If you use web.config, it would have a per-application effect.

If you use machine.config, the effect would be on the server as a whole.
If you use*.browser files, the effect would be on the server as a whole.

re:
What impact would this have in a shared hosting environment?

If you don't modify machine.config or use *.browser files, each individual user
would have to implement their own modifications to web.config if they want
to be able to implement accurate browser detection.

It's up to you as a shared hoster whether you want to offer such a service to your users.
 

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.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top