Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

Aspnet Treeview limit source page level

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matt - 15 Feb 2006 16:13 GMT
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>
Teemu Keiski - 15 Feb 2006 18:55 GMT
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-

Signature

Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

>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..
[quoted text clipped - 16 lines]
>
>  </siteMap>
Matt - 15 Feb 2006 19:53 GMT
Owesome
Thank you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.