Click here to Skip to main content
15,891,942 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to bind the category and subcategory data into single dropdownlist list as like the following

Science
--physics
--chemistry
--maths
Arts
--Tamil
--English
--Economics
I have the category and sub category data in two different table .
can any one help me ,how to develop
Posted
Comments
Salman622 11-Sep-13 4:01am    
Put where condition after from clauses

try this


string query="select c.Category+'-'+b.Sub_Category from Table1 c,Table2 b";


fetch the data in datatable then bind dropdown list to datatable
 
Share this answer
 
Comments
manvendra patel 11-Sep-13 3:54am    
hi,
thanks for your reply
but my problem remains the same.
check this i think it will help you.
 
Share this answer
 
 
Share this answer
 
 
Share this answer
 
Comments
manvendra patel 13-Aug-15 4:55am    
thnaks for your response, but its very old question.
Arasappan 13-Aug-15 5:05am    
whaen i saw in quick answer Now only see the day
manvendra patel 13-Aug-15 7:58am    
okey no problem

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