asp:menu selected Menu item Highlight
Posted
by Naimur
on Stack Overflow
See other posts from Stack Overflow
or by Naimur
Published on 2010-05-27T12:49:48Z
Indexed on
2010/05/27
12:51 UTC
Read the original article
Hit count: 597
ASP.NET
Hi, im using asp:menu for showing the menus in masterpage. If i click the menu item 1, the corresponding page is loading in the content page. I need that the selected Menu item should be highlighted by some color.pls Help me out
Menu coding is follows:
<items>
<asp:menuitem text="Home" Value="Home" NavigateUrl="~/page1.aspx"></asp:menuitem>
<asp:MenuItem NavigateUrl="~/page2.aspx" Text="About" value="About"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/page1.aspx" Text="Contact" Value="Contact"></asp:MenuItem>
</items>
<StaticSelectedStyle BackColor="#1C5E55" />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#666666" ForeColor="White" />
<DynamicMenuStyle BackColor="#E3EAEB" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<StaticHoverStyle BackColor="#666666" ForeColor="White" />
<StaticItemTemplate>
<%# Eval("Text") %>
</StaticItemTemplate>
</asp:menu>
© Stack Overflow or respective owner