Weird behavior with asp:Menu

Oct 25, 2009 at 1:34 PM

Hi everybody!

I'm very new to web site  development and to the MVC world.

I like this project very much, but i have some (strange) issues regarding the menu creation (may be due to the fact of not understanding all the puzzle):

a) when i use Html.Menu() the <ul> list returned by this method contains (or does not contain - depending on the user) the link for the controller decorated with Authorize. So it behaves as expected!

b) when i use this code snippet:

<asp:Menu ID="MenuAspNet" runat="server" DataSourceID="SiteMapDataSource1" >
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"  ShowStartingNode="False" />

the list returned by it contains always the link for the controller decorated with Authorize (ignoring thus the decoration). So it does not behave as expected (at least in my understanding of the puzzle)!

I have to use the b) form because of submenus.

Is there a workaround for this issue? Is this known to not work? Is this a bug?