I’m creating a shopping website by using asp.net and c#. So I need my menu to be linked to the table directly (aka bind). Since I’m building this site from ground up, the database design can be changed for this purpose. My category table is the one that I’m trying to bind it to menu control and it contains the following columns:
cat_id bigint, cat_name nvarchar(200), cat_parent bigint
So for each item I have a parent. I have no clue on how can I do this kind of binding?
in this instance, i’d probably setup a CTE stored procedure (to get a hierarchical structure), and return the table from sql to the Repeater control (or whatever control you are using).
that way your parent-child data is already returned in the correct order.