Combo Box to ListBox

S

Scott

I have an ASP page which show's a Drop-Down Combo box, and
a ListBox. My Combo Box is populated from a SQL Select
Statement which shows User Groups. I want to populate my
Listbox with all the names associated with that User Group
selected from the Combo Box. I have a Select Statement
that does this already also.

However, I need to pass the Selected item chosen in the
Combo Box with my SQL statement so I can get the correct
list of names returned. The ASP page tries to run both
Select statements, but errors when it reaches the second
select statement since the parameter hasn't been filled
yet, because the page hasn't given me a chance to chose an
item from the Combo Box.

Does anyone know how I can accomplish this?

Currently, we are NOT using ASP.Net.
 
R

Ray at

To do this, you need to either load all of the possible information in the
page and then use client-side script to change the second SELECT, or make it
a two step process where the user makes his first selection, the another
trip is made to the server (by submitting the data, or using client side
code to reload the page, etc.) and the server will then have that info it
needs for the second query.

See here for links to samples. http://www.aspfaq.com/2270

Ray at home
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top