I need to set the background for the currently active menu item?
I have used these
<StaticSelectedStyle CssClass="selectedMenuItem" />
CSS:
.DivLeftContent .selectedMenuItem:visited
{
background-color:#FBB2F7 ! important;
}
It is not worked.. Then i used this.
CSS:
.MenuItem a.static.selected
{
background-color:Black ! important;
}
OnPageLosd of master page
string path = Request.AppRelativeCurrentExecutionFilePath;
foreach (MenuItem item in menuItem.Items)
{
item.Selected = item.NavigateUrl.Equals(path,StringComparison.InvariantCultureIgnoreCase);
}
This is also not working..
I am using ASP.NET 3.5 and creating menu in master page.
Help me..
Thanks..