Reputation: 3734
I wanted to write if/for each statement that will get me all the child node where the rootNode = "home"
this is what i have so far
if (topLevelNode.Title == "Home")
{
var topLevelNodes = SiteMap......
}
foreach (SiteMapNode node in topLevelNodes)
{
...........................
}
Upvotes: 0
Views: 1031
Reputation: 24872
if (topLevelNode.Title == "Home")
{
var result = topLevelNode.ChildNodes;
}
Upvotes: 1
Reputation: 3734
if (topLevelNode.Title == "Home") { var topLevelNodes = topLevelNode.ChildNodes } foreach (SiteMapNode node in topLevelNodes) { //Do-What you want to the siteMap file }
Upvotes: 0