Dependent Dropdown Lists in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to find a way to create dependent dropdown lists in C# The old
way I knew involved javascript and will no longer work in the new design. I
need for each list to be database driven (data is pulled from database)

Example:
First Box would have Years 2004, 2003, 2002, 2001, etc.
Second Box: would have Ford, Chevy, Dodge, Toyota, Honda, etc
Third Box would have items based from first selelction(if Ford chosen)
F-150, Explorer, Bronco, etc

Does anyone have any thought on how this can be accomplished, I have stumped
all my fellow coworkers.

Thanks
 
Hi Tony,

Are you saying you want to avoid a postback event and dump all data onto the client and then sort
from there using javascript?
If so you can just registerscript using a couple of different methods as outlined here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/clientsidescript.asp


Otherwise i would say just define an OnSelectedIndexChanged event with autopostbackack enabled on
the second cbo, handle that on the server and then fill the third combos datasource from the db
depending on the selected value of the second cbo. However if you've stumped all your co workers
then im inclined to wonder if this is too simplistic and not what you want?

Richard
 
Thank you Richard for the reply, Im looking at the link currently to see if
this is what I needed.

If there are other suggestions as well they would be greatly appreciated as
well
 
Back
Top