It's the Roles that does it. Academically, it would be great if you could
confirm by trying it with the line
<siteMapNode title="Reports">
I tried adding the ~ to URLs. Didn't fix it.
Then I added a role and that fixed it.
The thing is, I don't want to restrict access to most of my top menu
items. Do you have everyone log in?
Thanks very much. I've ask this twice in the past with no response though
I usually get one in this NG. So I wonder how common that knowledge is.
Thanks again
And I would be interested to know if you can confirm.
Bogdan Jokel said:
It does work. I've been using sitemap + menu from asp.net 2.0 to 3.5.
There are many other ugly things that you might need to deal with but the
one you are trying to solve should be a non-issue.
For example, the following is a snippet from a working sitemap that works
with asp menu:
<siteMapNode roles="Administrators,Managers,Editors" title="Reports">
<siteMapNode roles="Administrators,Managers,Editors"
url="~/Reports/wizReport1.aspx" title="Report1" description ="Prints
report1" />
[...]
Clicking on the "Reports" menu item opens a pop-up menu with "Report1" as
the first item.
Bogdan
Cal Who said:
I hope you're correct but I tried
<siteMapNode title="HtmlEditor"
url=" "
description="FreeTextBox Editor">
<siteMapNode title="Info"
url="HtmlEditor/Info.aspx"
description="Info About FreeTextBox Editor"/>
</siteMapNode>
And
url=""
And also with no url mentioned at all.
And with both the url and description removed
In all cases the menu item did not show.
Tried
url="JUNK"
which showed but crashed when clicked.
Have you actually done what you said and had it work?
Maybe it a CSS thing?
Thanks
I use the <asp:Menu> element but one thing that always bothered me is
that:
In windows if I click the top menu item, say File or View, the menu
drop down appears but with asp:Menu the user is taken to a new page.
Must be confusing to someone who does not use it a lot.
Is there some way I can get the Windows type action?
I tried not specifying a URL in the site map but then the menu item
does not show at all.
Does asp:Menu change in Asp.Net 4.0?
Thanks
The user will be taken to a new page only if there is a valid url
associated with the menu item. For example, site map is quite often
used with menus. If you'd like a menu item behave like a pop-up only
then make sure that the corresponding site map node has a title but no
url (ie. url should be blank).
Bogdan