I copied this code from msdn that references the web.sitemap file, the only prolem is I have multiple sitemaps in my site, doe sanyone know how to reference the them as this is looking for web.sitemap which no longer exists
Code:Response.Write(SiteMap.CurrentNode.Title & "<BR>") Response.Write("<FONT COLOR='red'>" & SiteMap.CurrentNode.Url & "</FONT><BR>") ' What nodes are children of the CurrentNode? If (SiteMap.CurrentNode.HasChildNodes) Then Dim childNodesEnumerator As IEnumerator = SiteMap.CurrentNode.ChildNodes.GetEnumerator() While (childNodesEnumerator.MoveNext()) ' Prints the Title of each node. Response.Write(childNodesEnumerator.Current.ToString() & "<BR>") End While End If Response.Write("<HR>") ' Examine the RootNode, and navigate the SiteMap relative to it. Response.Write(SiteMap.RootNode.Title & "<BR>") Response.Write(SiteMap.RootNode.Url & "<BR>") ' What nodes are children of the RootNode? If (SiteMap.RootNode.HasChildNodes) Then Dim rootNodesChildrenEnumerator As IEnumerator = SiteMap.RootNode.ChildNodes.GetEnumerator() While (rootNodesChildrenEnumerator.MoveNext()) ' Prints the Title of each node. Response.Write(rootNodesChildrenEnumerator.Current.ToString() & "<BR>") End While End If




Reply With Quote