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



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

Answer / 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

More Dot Net Framework Interview Questions

How we can add the css in mvc?

0 Answers  


Explain encapsulation

1 Answers   HPCL, Hughes Systique Corporation,


what is MVC pattern?

2 Answers  


How would you make a combo-box appear in one column of a DataGrid?

1 Answers  


What is objectcontext? : Entity framework

0 Answers  


What is GUID , why we use it and where

1 Answers  


Can we have enum in entity framework?

0 Answers   Microsoft,


What is the CTS

1 Answers  


Is .net framework backwards compatible?

0 Answers  


What symbol would you use to denote, the start of a code block in razor views?

0 Answers  


i want to take the fast track training on >net Frame work and work flows and share point could you tellme the good institutes for that cources

0 Answers  


can i change web.config settings from iis?

1 Answers   HCL, ReadySoft, Wipro,


Categories