dual drop downs

G

Guest

I have 2 drop downs on my web page and this will allow the user to filter the
data on one drop down or both. How can I link these dropdowns together to
allow the user to filter on one or both?

example:
drop down one is cars:

BMW
Lexus
Mercedes

dropdown 2 is type
SUV
Sedan
Coupe
Convertiable

if the users selects BMW then i want to see all BMW's all models, if they
select Coupe then i want to show all coupes all makes. BUT if they select BMW
-- Coupe I want to see all BMW coupe's, how can I accomplish this? I have the
one filtering but i need to add the second drop down for possible filters.
 
G

Guest

Make both dropdowns have autopostback= true. Then double click each control
for the default selection changed event.

Have the dropdown1's event get its current value and use that to get a new
array/datatable. Rebind that array to dropdown2.

Have dropdown 2 do the same thing - add the autopostback, add code in event
to get its current value and use that to get the array/datatable for
dropdown1, then rebind that data to dropdown1.
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top