Bdscejzknsxcs
New Member
I've an ASP.NET Menu control bound to a sitemapdatasource.The web.sitemap is something similar to:\[code\]<?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0"> <siteMapNode title="Reports" roles="*"> <siteMapNode title="Node 1" roles="*"> <siteMapNode title="SubNode 1.1" url="http://XXXX" roles="*" /> </siteMapNode> <siteMapNode title="Node 2" roles="*"> <siteMapNode title="SubNode 2.1" url="http://YYYY" roles="*" /> <siteMapNode title="SubNode 2.2" url="http://ZZZZ" roles="*" /> </siteMapNode> </siteMapNode> </siteMap>\[/code\]The Menu display statically only the 1 level (Node X) and doesn't display the root node:\[code\]<asp:Menu ID="reportMenu" DataSourceID="SiteMapDataSource1" runat="server" Orientation="Horizontal" CssClass="menu" StaticDisplayLevels="1" OnMenuItemClick="reportMenu_MenuItemClick" > <DataBindings> <asp:MenuItemBinding DataMember="SiteMapNode" TextField="Title" ValueField="Url" /> </DataBindings></asp:Menu>asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false"/>\[/code\]The problem is the the OnMenuClickEvent is fired only when I click on "SubNode 1.1" and never on the other submenu.My event handler is:\[code\] protected void reportMenu_MenuItemClick(object sender, MenuEventArgs e) { HtmlGenericControl tempControl = frameReport as HtmlGenericControl; tempControl.Attributes.Add("src", e.Item.Value); }\[/code\]Using breakpoint and/or alert vua JS I can see that only when I click on Node 1.1 the event is fired... (NavigationURL is Empty, otherwise even the first Node would not generate the event).Inspecting the generated html with Fiddler and/or F12 on IE it seems that evey list item is equal to the other.Any suggestion?