Need help for Dynamic Dropdownlist in ASP
Does anyone know how to do dynamic dropdownlist in ASP? I have two dropdownlist. First will display all states. From the state, the second dropdownlist will display all the hotel name based on the state just now. Finally, when the user select one hotel, for example Hotel ABC, it will display the Hotel ABC information. All the information will be retrieve from databa开发者_运维百科se.
Can anyone help me with this. Need advice.
Thank you.
create a function that on selected index change of teh state drop down gets the hotel list from the db then populates the hotel drop down. make another function that is called on selected index change of the hotel drop down that get the hotel info and popultes the appropriate fields
This example uses Javascript, with asp and database interaction. I have used this example for something similar to what you want:
http://www.plus2net.com/asp-tutorial/db-dropdown.php
精彩评论