Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello please i am trying to design a demo airline reservation web application.please i have two dropdownlist controls named one and two respectively.Both drop downlist are connected to a data source from a databse.I want that if an item on dropdownlist1 is selected it will display only the related items on dropdownlist2 from the database.Let me say if dropdownlist1 contain a list of flight departing a city.I want when i click on an item in the list it displays all the flight route relating to only that route i click on dropdownlist2.
i want something similar to the control on this website http://www.acn.aero/cgi-bin/airkiosk/I7/181002i?AJ=2&LANG=EN[^]
the Leaving from drop list and the going to drop list
I really appreciate the efforts of anyone that can help me out i am a novice at visual basics
Posted
Comments
ZurdoDev 7-May-12 19:44pm    
All you have to do is add a parameter to the datasource for the 2nd dropdown to feed off of the first dropdown. What have you done so far?

1 solution

Private Sub dropdownlist1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dropdownlist1.SelectedIndexChanged
                If Not Dropdownlist2() Then
                    Exit Sub
                End If

End Sub



Bind dropdownlist2 when dropdownlist1 selected index change
in dropdownlist2 you can add filter of dropdownlist1 so you get only those item which is related to dropdownlist1.
 
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