Hi, I have a database table which stores the information on the Node relationship.

In the table tblNode, I have :


NodeID - (The ID of the node)

- (The ID of the Parent Node)

- (The position this Node is in under the Parent Node. Either Left or Right)

then in another table where we store the information of the Node,





Now I need to draw out a binary tree, it has to be dynamic, as the Node might be added / deleted.

And I wish to create a link to the user profile when a person click on a certain node. Something visual like this.


When i click each of the node, it will go to the profile page of the user.

I have no idea where to start this one, maybe a nested repeater ??

Thanks for all inputs and comments.

Recommended Answers

All 3 Replies

last year i created a web custom control that achieves this. I will try to find it for you. My control was based on the information taken from http://aspalliance.com/732, you can use that tutorial to achieve that, all i did was to embed that process into web custom control.

nice tutorial. But i require the tree to be horizontal and with left and right sides.

any ideas that can be done ?

anyhow, thanks for your reply, it really helps me.

if you want to achieve such a thing you should write your custom web control. it is not that hard, you are going to render pure html using the data from your database. Your visual representation logic is the hardest part i think. In html you dont have many tools to create a horizontal tree view like a chart.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.