Wednesday, April 08, 2009

Internet Explorer 8 and the ASP.NET menu control

I participated in the beta test of Internet Explorer 8.  I am also running a site built with ASP.NET. So one thing I did during the beta test was to test the site with the various Internet Explorer 8 beta versions.

The site was already updated some time ago to use standards mode instead of quirks mode, and renders fine on all other major browsers, including Firefox, Opera, Safari, and Chrome. Internet Explorer 8 is the first version of Internet Explorer to render in standards mode by default, so everything should be fine, at least in theory.

Beta 1 of Internet Explorer 8 had so many rendering issues that I quickly stopped the test and decided to wait for beta 2. In beta 2 there were much less issues, but some remained. Microsoft at the time recommended to use some meta tags on the site to ensure proper rendering in IE 8. However, these meta tags basically put IE 8 in compatibility mode, which is like running the IE 7 rendering engine in quirks mode – clearly not the right solution for a standards mode based site and an IE 8 trying to render in standards mode.

Therefore I decided that the remaining issues must be genuine bugs in IE 8 and reported those via Connect. One of the major issues I found was that the ASP.NET menu control doesn’t render correctly in IE 8.

The IE 8 team analysed the issue and found that this is actually caused by ASP.NET. The menu control analyzes the user agent and renders differently for IE, expecting that IE is rendering in quirks mode.

Therefore the ASP.NET team has now built a fix for the .NET framework, correcting the ASP.NET menu control so that it renders correctly for IE 8. As part of the fix process I had to test a pre-release version of the fixed .NET framework.

You can find this now described in the Microsoft knowledge base KB 962351, where you can also download a hotfix that you can install on your server to make sure that the menu is rendered correctly in IE 8.

No comments: