ASP.NET Menu Control and <xhtmlConformance mode="Legacy" />
I have been working on a project lately to convert an ASP.net application from .net 1.1 to .net 2.0. As part of the upgrade, we are going to use the new ASP.Net Menu control - complete with the Sql Site Map Provider.
Everything went extremely well - but when I rendered a test page, the menu looked really funky - with the side arrows all the way to the middle of the screen and the hover for the menu was REALLY off (sorry, no screenshot - confidentiality).
I created a new application, reconfigured everything - but I could not reproduce the issue.
Of course, then I started comparing the rendered XHTML output from the converted app to the new app - and bells started to chime in my head. Some of the output was just barely different from the old app to the new app.
I looked and it had nothing to do with my code at all - nothing on my end was emitting the offending markup. Strange...
After messing around a bit more, I combed through my web.config and found this wonderful tag:
<xhtmlConformance mode="Legacy" />
I had noticed it before - but I didn't know exactly what it was...although, after removing the tag - everything worked just fine!
After googling the tag itself, I found a number of articles about that particular tag in AJAX - but very few regarding the menu control in particular.
In any case, I'll chalk this one up to experience.
I hope this helps some poor soul other from experiencing the same aggravation as I.