Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi selection DropDown 1

Status
Not open for further replies.

FRANDAZZO

Programmer
Nov 29, 2000
60
US
Hello all question- I have a multi selection dropdown list. When you select more than 1 option in the list I see that in the querystring when i use the "get" method for each selection that I selected it puts the name of the control and the value. The end result is example - 10,20,30
Is there some way that i can get each one one the values and separate them because for each selection that they select I have to insert one value at a time into the database. Not send in in as 10,20,30. Each value has to be a record. Now I handeled for that in my stored proc but is there some way to do it before I send the values to the database.

Thanks,

Frandazzo
 
try this (assuming field name in database is Test_yr)....

' Put all selected value in array
if len(strSelectedValues) > 0 then
arYear = Split(strSelectedValues, ",")
InsertRows(arYear, "Test_yr")
end if


function InsertRows(ar, ByVal fldName)
for i = 0 to ubound(ar)
.....your insert statements here
next
End function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top