ASP.NET - Highlight the menu item .. - Asked By Hari krishna s on 08-May-12 07:21 AM

how to do  highlight the menu control after click the item in using css styles...
Please send the code...Thanks In adv..
dipa ahuja replied to Hari krishna s on 09-May-12 07:15 AM
<asp:ScriptManager ID="ScriptManager1" runat="server">
<cc1:HoverMenuExtender ID="HoverMenuExtender2" runat="Server" PopupControlID="sub"
PopupPosition="bottom" TargetControlID="lnkSub" PopDelay="25" Enabled="true" />

<table bordercolor="black" cellpadding="0" cellspacing="0" id="t" border="0" runat="server"
<tr><td height="20px" backcolor="blue" style="width44px">
<asp:LinkButton ID="lnkHome" Text="Home" ForeColor="White" runat="server" PostBackUrl="Default.aspx" />
<td height="20px" width="100">
<asp:LinkButton ID="lnkSub" ForeColor="White" runat="server" PostBackUrl="#" Text="Subject"/>
<table runat="server" id="sub" bgcolor="#E2E9F1" width="100">
<tr><td><a href="#">ASP.NET</a><br /><a href="#"> C#</a>
<br /><a href="#">VB.NET</a><br /><a href="#">J#</a><br />

[)ia6l0 iii replied to Hari krishna s on 09-May-12 10:23 AM
You need to use the "StaticSelectedStyle" element to style the selected menu items. Here's a sample.

<staticselectedstyle backcolor="Gray" bordercolor="Red" borderstyle="Solid"  borderwidth="2"/>

Also, note that you should not set the "IncludeStyleBlock" property to false - which means that you will provide the styles for the selected items. 

Hope this helps.