Thursday, June 12, 2008

ASP.NET Menu control & "downlevel" browsers

I ran into this fix when trying to get an ASP.NET 2.0 Menu control to render correctly on Safari. It turns out that ASP.NET thinks Safari is a downlevel browser (meaning incapable of rendering XHTML), so it sends a funky (and generally non-functioning) rendering of the Menu control down to the browser.

This isn't guaranteed to work in all cases, but in my case, adding the following Page directive did the trick:

<%@ Page ClientTarget="uplevel"... %>

No comments: