I have a navigation menu defined in visual web developer 2010 express using a bunch of tags. This worked as expected until a few days ago, when I must have accidentally changed something. I noticed the styles were no longer getting displayed on the menu, so I examined my master page and compared it to a default master page.
My page generates this for a menu item:
<table id="ctl00_NavigationMenu" class="menu ctl00_NavigationMenu_2" cellpadding="0" cellspacing="0" border="0">
<tr>
<td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(event)" id="ctl00_NavigationMenun0"><table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="white-space:nowrap;"><a class="ctl00_NavigationMenu_1" href="Default.aspx">Home</a></td>
</tr>
</table></td>
</tr>
</table>
Whereas the default master page generates this:
<li><a class="level1" href="Default.aspx">Home</a></li><li><a class="level1" href="About.aspx">About</a></li>
The problem seems to be that a table is being generated from the MenuItem tag instead of a list. How did I do this and how do I fix it?
Just shot in the dark, but did you make any changes to your framework version? When upgrading a project to 4.0, the following line gets added to your web.config
which changes the way some tags are rendered:
<pages controlRenderingCompatibilityVersion="3.5" ...
If it's there, you might try removing it...