Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 25th, 2006, 12:43 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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



  #2 (permalink)  
Old August 26th, 2006, 03:16 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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.
  #3 (permalink)  
Old October 25th, 2007, 01:46 PM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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



  #4 (permalink)  
Old October 25th, 2007, 02:33 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrox CMS - Altering the menu controls Eriskyne BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 October 15th, 2007 12:34 PM
How to bind Gridview with controls hyder_master .NET Framework 2.0 0 October 5th, 2007 05:01 AM
Data Bind Template Controls in Gridview wirerider ASP.NET 2.0 Basics 5 February 4th, 2007 07:20 AM
Bind result set to Html Div Controls jazzcatone ASP.NET 1.0 and 1.1 Basics 1 August 10th, 2006 07:35 AM
How to bind colors to controls in an formview leverell ASP.NET 2.0 Professional 0 May 31st, 2006 02:00 AM



All times are GMT -4. The time now is 07:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.