B
benjamin.soulier
Hello to everybody,
I Wanted to know if anyone get an item in <asp:menu> to be selected,
defining display of items using StaticItemTemplate. I thought
specifying a css class for StaticSelected or StaticItemSelected should
work, but even using standart parameter of styles within the object,
this does not work.
My code :
StaticitemTemplate in page.aspx:
<StaticItemTemplate>
<table border=0 width=100%>
<tr>
<td><a href="<%# Eval("NavigateUrl")%>"><%#
Eval("Text")%></a></td>
</tr>
</table>
</StaticItemTemplate>
To select an item:
protected void TopMenu_MenuItemDataBound(object sender, MenuEventArgs
e)
{
MenuItem item = e.Item;
if (item.ValuePath == "AboutUs/Default.aspx")
{
item.Selected = true;
}
}
Hope someone can help ;-)
Thanks to all in advance.
I Wanted to know if anyone get an item in <asp:menu> to be selected,
defining display of items using StaticItemTemplate. I thought
specifying a css class for StaticSelected or StaticItemSelected should
work, but even using standart parameter of styles within the object,
this does not work.
My code :
StaticitemTemplate in page.aspx:
<StaticItemTemplate>
<table border=0 width=100%>
<tr>
<td><a href="<%# Eval("NavigateUrl")%>"><%#
Eval("Text")%></a></td>
</tr>
</table>
</StaticItemTemplate>
To select an item:
protected void TopMenu_MenuItemDataBound(object sender, MenuEventArgs
e)
{
MenuItem item = e.Item;
if (item.ValuePath == "AboutUs/Default.aspx")
{
item.Selected = true;
}
}
Hope someone can help ;-)
Thanks to all in advance.