p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 24th, 2006, 01:40 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default display hierarchical site map using repeaters

I want to display a three levels site map as three levels of tabs. I use three repeater controls and three SiteMapDataSource controls as follows:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="srcBuckets"> .....
<asp:Repeater ID="Repeater2" runat="server" DataSourceID="srcPails"> ......
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="srcContents"> .....

<asp:SiteMapDataSource ID="srcBuckets" runat="server" ShowStartingNode="False"/>
<asp:SiteMapDataSource ID="srcPails" runat="server" ShowStartingNode="False" StartingNodeOffset="1" />
<asp:SiteMapDataSource ID="srcContents" runat="server" ShowStartingNode="False" StartingNodeOffset="2" />

After running, it displays the 1st level of tabs correctly. But when I click on one tab, it displays the 2nd level of tabs twice(even the third repeater displays 2nd level tab). I don't understand why, because StartingNodeOffset="2" for 3rd repeater control.

Only after clicking on one tab of the 2nd level of tabs, the 3rd level of tabs is displayed correctly.

What's wrong with 3rd SiteMapDataSource settings?

Appreicate your help



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old August 31st, 2006, 12:18 PM
Friend of Wrox
 
Join Date: Feb 2006
Location: , , USA.
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perhaps there is a solution for using three nested repeaters, but do you have to do it this way? The ASP.NET TreeView control might be a better fit for what you are after. You are after all, by default, connecting all three of your SiteMapDataSources to the same web.sitemap. You could cut this down to using one single treeview and one single siteMapDataSource, and achieve the same, plus a lot more functionality.

Neil Timmerman
Programmer
Veris Consulting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Site Map mallikalapati ASP.NET 2.0 Basics 1 February 9th, 2008 02:56 PM
Passing more than one querystring in the site map kaushikpulpa ASP.NET 2.0 Basics 1 April 20th, 2007 09:08 AM
display hierarical site map using repeaters wlin ASP.NET 1.0 and 1.1 Basics 0 August 24th, 2006 01:35 PM
Problem accessing Site Map abaechler BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 1 October 27th, 2005 05:12 PM
hierarchical display in datagrid aravwind General .NET 2 July 30th, 2004 04:12 AM



All times are GMT -4. The time now is 12:07 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc