ANAT2403
asked on
menu not showing sub menu in horizontal mode
In ASP.NE 2.0 with with C# I have a menu with a sitemap. one of the nodes has 3 subnodes with url links.
I want to get a horisontal menu with sub menus.
If I decalre it like this:
<asp:SiteMapDataSource runat="server" ID="SiteMapDataSource1" />
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataS ource1" Orientation="Horizontal"
MaximumDynamicDisplayLevel s="0" StaticDisplayLevels="2">
</asp:Menu>
I get a horizontal menu but the node with the sub menus does not show the sub menu.
If I declare it like this:
<asp:SiteMapDataSource runat="server" ID="SiteMapDataSource1" />
<asp:Menu ID="mnuHeader" runat="server" DataSourceID="SiteMapDataS ource1" Orientation="Horizontal" >
</asp:Menu>
I get a vetical menu and the sub menu is opened correctly.
Why can't I have the same in horizontal appearance?
I also show you the web.sitemap. (by the way the menu is in static mode)
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode url="~/electronics.aspx" title="Electronics" description="">
<siteMapNode title="Computers" description="" >
<siteMapNode url="http://cnn.com" title="CNN" description="" />
<siteMapNode url="http://msnbc.com" title="MSNBC" description="" />
<siteMapNode url="http://news.bbc.co.uk" title="BBC News" description="" />
</siteMapNode>
<siteMapNode url="~/default3.aspx" title="Home & Garden" description="" />
<siteMapNode url="~/default4.aspx" title="Clothing" description="" />
<siteMapNode url="~/default8.aspx" title="Entertainment" description="" />
</siteMapNode>
</siteMap>
please help
Anat
I want to get a horisontal menu with sub menus.
If I decalre it like this:
<asp:SiteMapDataSource runat="server" ID="SiteMapDataSource1" />
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataS
MaximumDynamicDisplayLevel
</asp:Menu>
I get a horizontal menu but the node with the sub menus does not show the sub menu.
If I declare it like this:
<asp:SiteMapDataSource runat="server" ID="SiteMapDataSource1" />
<asp:Menu ID="mnuHeader" runat="server" DataSourceID="SiteMapDataS
</asp:Menu>
I get a vetical menu and the sub menu is opened correctly.
Why can't I have the same in horizontal appearance?
I also show you the web.sitemap. (by the way the menu is in static mode)
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode url="~/electronics.aspx" title="Electronics" description="">
<siteMapNode title="Computers" description="" >
<siteMapNode url="http://cnn.com" title="CNN" description="" />
<siteMapNode url="http://msnbc.com" title="MSNBC" description="" />
<siteMapNode url="http://news.bbc.co.uk" title="BBC News" description="" />
</siteMapNode>
<siteMapNode url="~/default3.aspx" title="Home & Garden" description="" />
<siteMapNode url="~/default4.aspx" title="Clothing" description="" />
<siteMapNode url="~/default8.aspx" title="Entertainment" description="" />
</siteMapNode>
</siteMap>
please help
Anat
ASKER
Hi Bob,
I sent you 2 files: one is the web.sitemap. the other is a file in which I put 2 menus: if you run it you see that the first menu is horizontical but does not show the sub menus for computers. the second menu is vertical and does show the sub menu for computer. I want a menu to be horizontical and show the sub menu for computers.
thankyou
anat
I sent you 2 files: one is the web.sitemap. the other is a file in which I put 2 menus: if you run it you see that the first menu is horizontical but does not show the sub menus for computers. the second menu is vertical and does show the sub menu for computer. I want a menu to be horizontical and show the sub menu for computers.
thankyou
anat
ASKER
https://filedb.experts-exchange.com/incoming/ee-stuff/4727-temp.zip
the link to the files
the link to the files
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Bob,
Thankyou very much. It finally worked. I just have some questions:
Although it worked good when I changed to the design view there was a message error on the menu:
"Error parsing control: A relative URI cannot be created because the 'uriString' parameter represents an absolute URI" Do you know why?
It worked when staticdisplayLevel ="2" and MaximumDynamicDisplayLevel s ="1"
Anat
Thankyou very much. It finally worked. I just have some questions:
Although it worked good when I changed to the design view there was a message error on the menu:
"Error parsing control: A relative URI cannot be created because the 'uriString' parameter represents an absolute URI" Do you know why?
It worked when staticdisplayLevel ="2" and MaximumDynamicDisplayLevel
Anat
Hello,
Do you know how to fix the error in design view? I have a similar problem and it works fine on the web browser but not in design and I will like to fix it.
Thank you,
Oswaldo
Do you know how to fix the error in design view? I have a similar problem and it works fine on the web browser but not in design and I will like to fix it.
Thank you,
Oswaldo
2) It showed a menu with sub-menus for me.
3) Can you post a screen shot to http://www.ee-stuff.com, and give me the URL for the file?
Bob