Click here to Skip to main content
15,913,773 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i'm trying to develop a web page where dynamic drop down lists can be created based on few conditions.

At Database Side, a table with three columns

Column Name
===========
ID
Name
ParentID

where ID is unique sequence number, Name is the category name & ParentID is the category id to which it points to.

for example, 'a' is a category with parentid 0 & id as 1, 'b' is another category whose parentid is 1 & id as 2, and again 'c' is another category whose parentid is 2 and its id is 3, etc..

At ASP.Net Design side,

a drop down control and a textbox where drop down contains the parentid name value pairs (ID, Name). when drop down is not selected & a name is entered in the below textbox, it is created as a category with parentid as 0 (zero). whenever a drop down is selected with category name and name is entered as saved, it is saved as a sub category with parentid as category id as selected from the drop down list.

in case if the category selected in the drop down list contains further categories then here, dynamic drop down list to be display as filled with the appropriate categories as selected in the first drop down lists. in case, if the second drop down list category has further categories, then a new dynamic drop down list to be populated and filled with the appropriate categories. and this goes on & on & on ...

So, please help me in this regard.

Regards,
Rajendra Prasad
Posted

This article helps you in creating dynamic dropdownlist.
creating dynamic drop down lists[^]
 
Share this answer
 
Comments
Pratik Bhesaniya 21-Apr-11 4:48am    
very nice link
Hope this[^]also might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900