ASP.NET and Firefox

I have been really struggling this morning with the way ASP.NET renders server controls for Firefox. It will render a Panel as a DIV under IE, but as a TABLE under Firefox.
I thought I was going to need to include different stylesheets for different browsers and I was getting kinda annoyed by it all because Firefox can easily handle DIVs.

And then I found this really helpful post that caused the problem to disappear instantly.

Basically, the default browser capabilities (browsercaps) for Netscape-like browsers is to treat them as downlevel browsers. The post shows what you need to add to web.config to get Firefox and its ilk to be treated as the uplevel browsers that there are.

Leave a Reply