How the color of selected menu item will be changed in
asp.net menu item?

Answer Posted / honey

<asp:Menu ID="AdminMenu" OnMenuItemClick="return MenuClick
()" runat="server" BackColor="#BDDDEA"
DynamicHorizontalOffset="2"
Font-Names="Verdana" Font-Size="0.8em" Font-
Underline="True" ForeColor="#284E98"
StaticSubMenuIndent="10px"
CssClass="LinkStyle"
OnMenuItemDataBound="AdminMenu_MenuItemDataBound">
<StaticMenuItemStyle
HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#284E98"
ForeColor="White" />
<DynamicMenuStyle BackColor="#B5C7DE"
HorizontalPadding="5px" />
<DynamicSelectedStyle BackColor="#507CD1"
CssClass=".orange"/>
<DynamicMenuItemStyle
HorizontalPadding="15px" VerticalPadding="2px"
BackColor="#FFE0C0" />
<Items>
<asp:MenuItem
NavigateUrl="~/Admin/Cities.aspx" Text="Cities"
Value="Cities"></asp:MenuItem>
<asp:MenuItem
NavigateUrl="~/Admin/Location.aspx" Text="Locations"
Value="Locations">
</asp:MenuItem>
<asp:MenuItem
NavigateUrl="~/Admin/MainCategories.aspx" Text="Main
Category" Value="Main Category">
</asp:MenuItem>
<asp:MenuItem
NavigateUrl="~/Admin/GeneralCategory.aspx" Text="General
Category"
Value="General
Category"></asp:MenuItem>
<asp:MenuItem
NavigateUrl="~/Admin/SubCategory.aspx" Text="Sub Category"
Value="Sub Category">
</asp:MenuItem>
<asp:MenuItem
NavigateUrl="~/Admin/SubCategoryAttributes.aspx" Text="Sub
Category Attributes"

Value="SubCategoryAttributes"></asp:MenuItem>
<asp:MenuItem
NavigateUrl="~/Admin/UserCategories.aspx" Text="User
General Categories"
Value="User General
Categories"></asp:MenuItem>
<asp:MenuItem
NavigateUrl="~/Admin/UserSubCategory.aspx" Text="User Sub
Categories"
Value="User Sub
Categories"></asp:MenuItem>

When I Select any menu item that should be highlight like
the text becomes bold and change background color.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does servicing work for the .net framework 3.0? If I install the .net framework 3.0, can I get service updates for the .net framework 2.0?

518


Explain Model, view and Controllers in Asp.Net MVC?

562


What is conceptual model? : Entity framework

531


Can you explain model, controller and view in mvc?

567


How route table is created in ASP.NET MVC?

599






How to Redirect Tracing to a File

595


what is more complex to implement property, methods or event? how can I define criteria to compare the difficulty of implementation between them? for example the number of methods wanted to implements property is 2 methods. how many methods I need it to implements events?

1693


mention what are the various methods provided by the dataset object to generate xml?

600


will there be any issues adding a table without primary keys to a data model?

610


Explain .Net Framework? Why we use it?

611


What are the 2 popular asp.net mvc view engines?

523


What is the advantage of using asp.net routing?

595


What is a view engine?

570


what is conceptual model?

604


What is meant by bootstrap in mvc5?

643