現在アクティブなメニュー項目の背景を設定する必要がありますか?
私はこれらを使用しました
<StaticSelectedStyle CssClass="selectedMenuItem" />
CSS:
.DivLeftContent .selectedMenuItem:visited
{
background-color:#FBB2F7 ! important;
}
動作しません。それから私はこれを使用しました。
CSS:
.MenuItem a.static.selected
{
background-color:Black ! important;
}
マスターページのOnPageLosd
string path = Request.AppRelativeCurrentExecutionFilePath;
foreach (MenuItem item in menuItem.Items)
{
item.Selected = item.NavigateUrl.Equals(path,StringComparison.InvariantCultureIgnoreCase);
}
これも機能していません。
ASP.NET 3.5を使用していて、マスターページでメニューを作成しています。
助けて..
ありがとう..