Reputation: 2788
I'm looking to get a set of child nodes from a sitemap starting at a specific node. I've looked at the Microsoft documentation but don't really know how to use it.
Can anybody provide me an example?
Upvotes: 0
Views: 887
Reputation: 56909
If you set the key on your mvcSiteMapNode, like this:
<mvcSiteMapNode title="My Action" action="MyAction" controller="MyController" key="1234" />
You can call FindSiteMapNodeFromKey() to get a reference to that node.
var node = MvcSiteMapProvider.SiteMaps.Current.FindSiteMapNodeFromKey("1234");
Upvotes: 2