Click here to Skip to main content
15,921,052 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


Can anyone tell me the reason why the Selected(Dynamic/Static) menu item style doesn't change if clicked on the menu item?



<asp:Menu ID="m1" runat="server" MaximumDynamicDisplayLevels="3"
               Orientation="Horizontal">
               <staticmenuitemstyle cssclass="StatMenuItemStyle" />
               <staticselectedstyle cssclass="StatSelectedStyle" />

               <items>
                   <asp:MenuItem NavigateUrl="~/one.aspx" Text="one" Value="a">
                   <asp:MenuItem NavigateUrl="~/two.aspx" Text="two" Value="b">
                   <asp:MenuItem NavigateUrl="~/three.aspx" Text="three" Value="c">
               </items>



I ahve added the stylesheet to change the font color and background style.But if it is navaigating from, say "one.aspx" to "two.aspx" the menu item "two"'s style doesnt change

Thanks in advance
Posted
Updated 30-Jun-11 19:34pm
v2

1 solution

May be issue in your code(CSS) in the stylesheet. Look at the below article.
Menu Control Selected Item Color Change Depending on Selection[^]
 
Share this answer
 
Comments
aswathy.s.88 5-Jul-11 0:50am    
No... It doesn't work for me if I'm not populating items from XML

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900