StaticDisplayLevels="2" DynamicHorizontalOffset="2" DynamicVerticalOffset="5"
ForeColor="White" StaticSubMenuIndent="0px" StaticEnableDefaultPopOutImage="false"
OnMenuItemDataBound="Menu1_MenuItemDataBound" Target="_self">
<StaticSelectedStyle BackColor="#0A7D92" />
<StaticMenuItemStyle VerticalPadding="2px" ItemSpacing="0px" />
<%--
<DynamicMenuStyle BackColor="#0A7D92" BorderWidth="1" BorderColor="Black" CssClass="tdInput" />
<DynamicSelectedStyle BackColor="#FFCC66" />
<DynamicMenuItemStyle HorizontalPadding="5px" />
asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="Connectors" />
protected void Menu1_MenuItemDataBound(object sender, MenuEventArgs e) {
MenuItem item = (MenuItem)e.Item;
if (e.Item.Depth == 1 || e.Item.Depth == 0)
{
// Reference the underlying SiteMapNode object...
SiteMapNode nodeFromSiteMap = (SiteMapNode)e.Item.DataItem;
item.NavigateUrl = nodeFromSiteMap.Url;
item.ImageUrl = nodeFromSiteMap["imageUrl"];
item.Text = "";
}
else
{
item.Target = "_blank";
}
}
0 comments:
Post a Comment