Showing more than 1 Level fails

Nov 14, 2010 at 1:41 PM

Hi together,

I'm pretty new with MvcSiteMapProvider, so please excuse my possibly stupid question.

I'm testing with 2.2.1 - wondering where the .Submenu - Helper is to find.
Searching the source, I found out that it was removed after 2.1.0

Okay, then I tried to use the new way: specifying the starting node level and the max depth using .Menu(1,2)
Now it bombs me with "Object reference not set to an instance of an object" exceptions.

What am I doing wrong?
I'd just like to have a little second menu level.
Am I too stupid for that? :-(

Please give me a little hint.

Thanksalot!
Sascha 

Coordinator
Nov 15, 2010 at 11:42 AM

Can you post a little bit more code?

Nov 15, 2010 at 11:56 AM

I didn't really code anything, it's just the default-templates, the .sitemap-File and the registration of the sitemap-provider in web.config.

Then I'm calling <%=Html.MvcSiteMap().Menu(1,2) %>in site.master

That's all - can't you reproduce it?

Coordinator
Nov 15, 2010 at 2:19 PM

Just added that piece of code to the example project and works like a charm. Are you using your own project or the example code?

Nov 15, 2010 at 3:32 PM

I'm using my own project, but I'd like to test it with the example project.
Which one are you using? The Mvc Music Store or another one? (can you post a link to it?) 

Coordinator
Nov 18, 2010 at 7:04 AM

I'm using the MVC music store from http://mvcsitemap.codeplex.com/releases/view/55016