
December 23rd, 2008, 12:51 PM
|
 |
Wrox Author
Points: 33,170, Level: 79 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,161
Thanks: 7
Thanked 188 Times in 186 Posts
|
|
Hi there,
One way is to store tree data in a tabe with a self join. E.g.:
Code:
Id Name ParentId
1 Root <null>
2 Child 1 1
3 Child 2 1
4 Grand Child 1 3
The ParentId column then refers to the Id column of the same table.
This way, you can always see to what parent an item belongs.
You can learn more about trees in ASP here:
http://www.codeproject.com/KB/asp/treecontrol.aspx
http://www.planet-source-code.com/vb...txtCodeId=6411
Hope this helps,
Imar
Last edited by Imar : December 23rd, 2008 at 12:54 PM.
|