My database structure is:
Table Name: Category
Columns: CategoryID | CategoryName | ParentID
I want to list all categories by their children and their childrens' children also. I'm using WITH
for finding all levels in MS SQL, but how can I show that in ASP.NET? I tried many different things about that but nothing has worked for me. I found Treeview
in some websites but I didn't use that.
I also have another question about hierarchical data: when I search for a product that is connected to child and list the parent categories how can I show the child's products?