473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Aspnet Treeview limit source page level

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>

Feb 15 '06 #1
2 1142
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-

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Matt" <me*******@Hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
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>

Feb 15 '06 #2
Owesome
Thank you.

Feb 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: serge calderara | last post by:
dear all, Is there an easy way to bind a treeview control with an XML object as datasource? In a similar way as the dataset is doing, and build columns accroding to XML node, I could imagine a...
1
by: Scott | last post by:
Hi everyone! My Access app. uses the ActiveX Treeview control to show a hierarchal structure of records. Each record has a name and a "parent" along with some other attibutes. For example: ...
42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
0
by: Mike Preston | last post by:
Warning - long message. Many thanks for making the A97 version of the treeview w/o activex controls available. I have taken it down a different path and ended up doing almost everything...
14
by: Evan Kontos | last post by:
I am trying to implement a Treeview w/an XML file and I even copied and pasted examples from MSDN but can't get them to work. Any suggestions welcome. XML File <TREENODES> <TREENODE...
10
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a...
2
by: Simon Rigby | last post by:
Hi folks, A bizarre problem I am having. I have a treeview which is bound to an XmlDataSource. The XMLDataSource.Data property is set to the result of a function that generates an XML...
1
by: Falcula | last post by:
Hello, I have a treeview control, when i select a item i navigate to url. But selected node is lost, it reset itself, loosing state. I post my code here. Thanks in advance. <script...
0
by: Falcula | last post by:
Hello, I have a treeview that i fill from a database, when i update nodename in database the treeview dont update. Its works when iam not useing enableviewstate="true" but then i loosing the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.