Category Subcategory display in Dropdown list

N

Nitin Nikam

Hello,
I m developing application of link directory using VS-2005. In this
application i have a dropdownlist.
In dropdownlist i want to display categories, sub-categories,
sub-sub-categories upto any level
(for eg. country--state--district--city--village etc.)
The dropdownlist will look like
Arts
--camera
--photography
----General Photos
----Digital Photos
Company
--employee
----Jr. employee
----Sr.employee
--Manager
----HR manager
----General manager


here i shown categories upto 3 levels but, levels will be 4-5 or more
In database table i have two columns named categoryid(primary key of
categories table) & another one is
parentid(which stores value of main categoryid)
eg. in above dropdown items, categoryid for Arts category is 1 and parentid
is 0. & parentid of Arts(i.e. 1)
is parentid of camera & photography & like this will continue

if anyone have solution for finding subsub-categories them reply me

I have done this upto two levels & but it will not produce recursively

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top