0

enter image description here

I want to show family hierachy in asp.net.

I have table as Family with attributes ParentID, ChildID, Name. Table have seft join on ParentID and ChildID. How I show the data from database. The hierarchy level is not fix.

#edited

I want aspx part to show this hierarchy tree i.e How I will show this tree in aspx using reapeater or other any control.

glenatron
  • 11,018
  • 13
  • 64
  • 112
user
  • 793
  • 4
  • 14
  • 23

2 Answers2

0

Just create table in Database 'Person','ParentChild'. 'Person' table with columns Id and Name, 'ParentChild' with columns ParentId and ChildId. ParentId and ChildId will have reference to Id column in 'Person' table, so you can save easy your hierarchy, and get with query.

0

The structure you have shown here is like a tree. So the simplest approach will be to implement SQL tree at the backend. Once you have done that there is a tree view control in asp.net that you can use to show up the data on front end. The best i could find is Here