PDA

View Full Version : 2 dynamic ddl - value get from db


Cuttie0506
02-16-2006, 04:25 AM
Hi.. i'm doing asp...

I'm trying to display 2 dynamic dropdown list, which the values are from the db..

When i select the 1st dropdown, it will populate another dropdown...
I have been looking for that for quite some time, but didnt manage to get what i want..

Can any1 help me?

ihitman
02-16-2006, 09:40 AM
Take a look at the following link...

http://www.atgconsulting.com/doublelist.asp

degsy
02-16-2006, 01:52 PM
If you want to use pure ASP then you need 2 queries.

The first query will populate the first dropdown.

"SELECT id, name FROM manufacturer ORDER BY name ASC"


When submitted the value will be used as the variable in the second dropdown.

manufacturer = Request.Form("selMan")

"SELECT id, model_name FROM model WHERE manufacturer_id = " + Replace(manufacturer, "'", "''") + " ORDER BY model_name ASC"


example
http://computer-helpforum.com/asp/select.asp

Cuttie0506
02-17-2006, 10:01 AM
thanks for your reply, thats not what i want.. anyway, i got this problem solved... ^^