Thursday, May 20, 2010

ASP.NET 4.0 - Menu Rendering Problem - controlRenderingCompatibilityVersion

 I really like the way the menu control in ASP.NET 4.0 renders and having upgraded an existing site in Visual Studio  2010 I was confused for a while as to why it was not rendering as I expected. Having checked I was using the new stylesheet I discovered when I viewed the html source that the upgraded site was rendering the menu as a table  whilst 4.0 was rendering it as a list.

Bingo found the problem the upgrade sticks the line  controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"  in the web.config file which as the name suggest controls rendering compatibility. Removed this and it worked

No comments:

Post a Comment