|
-
Jan 30th, 2001, 06:20 PM
#1
Thread Starter
New Member
How can I create a tree structure in asp useing a recursive function.
Ex. Database with three fields: ID, Parent_Id, Name
1 0 NFL
2 0 NBA
3 1 AFC
4 1 NFC
5 3 East
6 3 West
7 4 East
8 4 West
9 2 East
10 2 West
Output on Page in links.
NFL
- AFC
- East
- West
- NFC
- East
- West
NBA
- East
- West
The code should be dynamic and allow for any number of parent/child levels.
Thanks,
Kevin
-
Feb 1st, 2001, 09:39 AM
#2
Addicted Member
Unfortunately making an infinate tree structure in ASP is not as easy as it might sound, I had to do it once with a dhtml dropdown menu system. The only way to do it, is to define a function that draws a sub menu, then make a call on it, have the function itself check if it needs to draw a sub function, then call itself again. But bewarned, vb and asp do not thread well, and I dunno what affect it might have on server performance(I decided on a fixed 99branch length tree for my dhtml solution)
-
Feb 2nd, 2001, 08:23 AM
#3
Conquistador
i have made code for a treeview in jscript.
i don't know where it is but i will try to find it and make a new one for asp
does it have to run off a database?
-
Feb 2nd, 2001, 02:52 PM
#4
Thread Starter
New Member
asp tree
Thanks for replying to my query about an asp tree.
Yes, it will be using a database. The result is to create
a left navigation of links with tree structure hierarchy.
-
Feb 4th, 2001, 09:18 PM
#5
Lively Member
I think this will be useful for you : CodeCharge software. It has an example of how to make trees using ASP, ASP Templates. It's really cool. Check it out.
http://www.codecharge.com
There is a trial download for it. Good luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|