Why dont you use ASP TREEVIEW CONTROL.
<asp:treeview id="TreeView1" runat="server" xmlns:asp="#unknown">
</asp:treeview>
Fetch you data and populate the treeview. The Best way is to create an XMLDOC object of your hirarcy and map that XMLDOC to your treeview