Link to home
Start Free TrialLog in
Avatar of ANAT2403
ANAT2403Flag for Israel

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="SiteMapDataSource1"   Orientation="Horizontal"
 MaximumDynamicDisplayLevels="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="SiteMapDataSource1"    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 &amp; Garden"  description="" />
      <siteMapNode url="~/default4.aspx" title="Clothing"  description="" />
      <siteMapNode url="~/default8.aspx" title="Entertainment"  description="" />
  </siteMapNode>
</siteMap>
please help
Anat
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

1) I have Visual Studio.NET 2005 Team Edition SP1

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
Avatar of ANAT2403

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
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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 MaximumDynamicDisplayLevels ="1"
Anat
Avatar of ocortes
ocortes

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