Expression web .net menu controls

September 19, 2011 at 10:47 am

I have had issues with the menu control rendering the sub/fly out menus in certain browsers when the control was created with expression web 2. It has come to light, that, expression web version 2 and v4 give different codes for the menu controls. Subtle but different.

Below is the code generated by expression web.


Further the code below comes from expression web version 4.


From what i can see based on the following menu set up.

Drag menu onto aspx page. EWv2 names the control “Menu” whereas EW4 names it “Menu1” However – This could simply be a sequential thing, and not an issue

Also notice that v2 offers

“<asp:Menu runat="server" id="Menu1">”

Whilst v4 gives…

“<asp:Menu id="Menu1" runat="server">”

As you can see a reversed string.

The only other discernable difference is the capitalisation of the actual menu items, V2 being lowercase and V4 capitalised.

So i made these changes to a menu i have that i know renders incorrectly, uploaded to the server and no difference at all.

So where to look next?

I noticed as i flick about between the 2 versions and various screens that in fact there is a major difference between the 2 versions.

Version 2 rendered the control in split view


Version 4 or the same control split view


As you can see version 4 includes some styles! They are .net system styles and you can’t do a whole lot with them really but interestingly, flicking around i notice a Z Index setting on one of these styles BINGO!

Unfortunately i can’t get a screen shot of the style but it is enough to know that V2 menu controls can be used with a simple class style.

Create a class style in expression web something like

.menuforward {
    z-index: 1;
    background-color: #E9E9E9;
    border-right-style: solid;
    border-width: 3px;
    border-color: #CCCCCC;
    padding-bottom: 8px;
    padding-right: 5px;

NOTE* The Z Index

Then simply apply this class style to the menu control dynamic menu style in the tag properties Styles.


So what on the face of it seemed a bit of a nightmare, does actually have quite a simple solution.


Have Fun


Entry filed under: expression web help, Gooffiliate Gold - affiliate members.

Railway Modellers Guide – The comprehensive directory for modellers Model Railway Merchants


September 2011
« Jun   Oct »

Most Recent Posts

%d bloggers like this: