J
Just Me
I am using ASP.NET 2.0 and a menu.
I have the menu working ok except for one thing. I cannot get it to apply
the selectedItemStyle class name to the menu item which has been clicked on.
Here is some more information
a.) I have the menu in the site1.master
b.) I have double checked that the class name in css and class name in the
properties for the menu do match.
c.) I have tried double clicking on the menu to create an event handler and
in that handler I put e.item.selected=true, but the event never fires when i
click on the static menus .
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="default.aspx" Text="Home"
Value="Home"></asp:MenuItem>
<asp:MenuItem NavigateUrl="Events.aspx" Text="Events"
Value="Events"></asp:MenuItem>
<asp:MenuItem NavigateUrl="Contact.aspx" Text="Contact"
Value="Contact"></asp:MenuItem>
</Items>
<StaticMenuItemStyle CssClass="staticMenuItemStyle" />
<StaticHoverStyle CssClass="staticHoverStyle" />
<StaticSelectedStyle CssClass="staticSelectedStyle" />
</asp:Menu>
I have the menu working ok except for one thing. I cannot get it to apply
the selectedItemStyle class name to the menu item which has been clicked on.
Here is some more information
a.) I have the menu in the site1.master
b.) I have double checked that the class name in css and class name in the
properties for the menu do match.
c.) I have tried double clicking on the menu to create an event handler and
in that handler I put e.item.selected=true, but the event never fires when i
click on the static menus .
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="default.aspx" Text="Home"
Value="Home"></asp:MenuItem>
<asp:MenuItem NavigateUrl="Events.aspx" Text="Events"
Value="Events"></asp:MenuItem>
<asp:MenuItem NavigateUrl="Contact.aspx" Text="Contact"
Value="Contact"></asp:MenuItem>
</Items>
<StaticMenuItemStyle CssClass="staticMenuItemStyle" />
<StaticHoverStyle CssClass="staticHoverStyle" />
<StaticSelectedStyle CssClass="staticSelectedStyle" />
</asp:Menu>