Hello All,
I am trying to apply CSS to the ASP.NET menu.I have a horizontal menu with each heading having menu items within it.I want to display the selected menu heading and all the menu items within it with a different color.I am not sure how does the selected item change when using menu in ASP.NET? Is it possible to do this in ASP.NET? I tried to use Sitemap but I can't seem to specify more than sitemap node!
Here is my code:-
<asp:Menu ID="NavigationMenu" runat="server" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="3" IncludeStyleBlock="false" CssClass="menu" EnableViewState="false" Orientation="Horizontal">
<Items>
<asp:MenuItem Selected="true" Enabled="true" NavigateUrl="~/MenuPage.aspx" Text="Home">
<asp:MenuItem NavigateUrl=" Text="google"></asp:MenuItem>
<asp:MenuItem NavigateUrl=" Text="yahoo"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/MenuPage.aspx" Text="About">
<asp:MenuItem NavigateUrl=" Text="bing"></asp:MenuItem>
<asp:MenuItem NavigateUrl=" Text="msn"></asp:MenuItem>
<asp:MenuItem NavigateUrl=" Text="cnn"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
Please give some suggestions.
I am trying to apply CSS to the ASP.NET menu.I have a horizontal menu with each heading having menu items within it.I want to display the selected menu heading and all the menu items within it with a different color.I am not sure how does the selected item change when using menu in ASP.NET? Is it possible to do this in ASP.NET? I tried to use Sitemap but I can't seem to specify more than sitemap node!
Here is my code:-
<asp:Menu ID="NavigationMenu" runat="server" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="3" IncludeStyleBlock="false" CssClass="menu" EnableViewState="false" Orientation="Horizontal">
<Items>
<asp:MenuItem Selected="true" Enabled="true" NavigateUrl="~/MenuPage.aspx" Text="Home">
<asp:MenuItem NavigateUrl=" Text="google"></asp:MenuItem>
<asp:MenuItem NavigateUrl=" Text="yahoo"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/MenuPage.aspx" Text="About">
<asp:MenuItem NavigateUrl=" Text="bing"></asp:MenuItem>
<asp:MenuItem NavigateUrl=" Text="msn"></asp:MenuItem>
<asp:MenuItem NavigateUrl=" Text="cnn"></asp:MenuItem>
</asp:MenuItem>
</Items>
</asp:Menu>
Please give some suggestions.