|
|
 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
 | This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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.
|
 |

August 25th, 2006, 01:43 PM
|
|
Registered User
|
|
Join Date: Aug 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
CMS: Bind Nav Data to Treeview/Menu controls
Hi Imar,
Great book, BTW.
I'm looking for the simplest path to binding the Nav Data to an XmlDataSource (..ObjectDataSource?) to serve to treeview/menu controls, vs. the current two repeaters in the SiteMenu.ascx.
I've created a (mostly) functional example with a relational dataset bound to XmlDataSource, transformed via .xsl file. It's probably more complicated than it needs to be- and xsl is still quite foreign to me.
Might you have any suggestions/overview of the most logical way to do this?
FWIW- I'm also thinking that a single, self-referencing table to store ContentType/Category data.. along with appropriate business/presentation mods, could provide unlimited category levels. Ultimately, I'll rewrite friendly urls.. (which I'm surprised nobody has mentioned yet)
Your comments would be greatly appreciated!
B
|

August 26th, 2006, 04:16 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
Hi there,
You have a few options. One is to stick with the XSL file. I am not too good with XSL to I can't recommend much to improve your code.
Alternatively, you can use the SiteMap file and provider. This control displays hierarchical data by default. You could write a physical copy of the site map whenever you make a change in the categories in the system.
Finally, you can indeed use a relational dataset with a self referencing column. You could write a recursive method that loops through this dataset and manually adds nodes to the TreeView at the requested level. I have done that a while ago, so I can assist you with it if you need some help.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|

October 25th, 2007, 02:46 PM
|
|
Registered User
|
|
Join Date: Oct 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar
I realize this post is quite old but i am interested in setting up a self referencing table to allow for unlimited categories. If you could provide me an example or a starting place on how to setup the recursive method for the treeview and any other help would be most appreciated.
Thanks again and great book btw!
Adam
|

October 25th, 2007, 03:33 PM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
Hi Adam,
I haven't tested the code in this article, but it looks like it does what you need: http://www.codeproject.com/aspnet/Au...ngTreeView.asp
If you need more help, let me know. I don't have the time right now to dig up the old code I was referring to (can't even recall where I used it, to be honest...
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |