Aspnet Treeview limit source page level

M

Matt

I have below sitemap as source for treeview that sits on master pages..
Is there a way to limit source for treeview to page level..
When i cruise the pages i would like to see only related nodes for that
page versus see all nodes in every page
Example would be..
A.aspx would show only
a.aspx
b.aspx
instead of showing all tree.....?


<siteMapNode url="Default.aspx" title="Home" description="Home">
<siteMapNode url="A.aspx" title="A" description="A Desc" />
<siteMapNode url="a.aspx" title="a" description="a Desc" />
<siteMapNode url="b.aspx" title="a" description="a Desc" />

<siteMapNode url="B.aspx" title="B" description="B Desc " />
<siteMapNode url="C.aspx" title="C" description="C Desc" />
</siteMapNode>

</siteMap>
 
T

Teemu Keiski

Hi,

you can do something like that if you have a SiteMapDataSource control in
use. Set StartFromCurrentNode="True" when it would switch the display to
always start from the Page you are navigating on. Then set
StartingNodeOffSet="n" where n is the number levels to display up (up or
down based on do you give negative or positive value)

Though it seems that your nodes are on the same level-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top