Quote:
Originally Posted by moskie_work
I am trying to go through all the parameters from a certain multi-select box of the request object and generate a CSV list with each value wrapped in a pair of single quotes. What I have is:
Trace gives me the output of:
Chemicals List:'100-01-6,100-41-4,100-42-5'
Those are the right values, but you can see that there should be more quotes between each of the values. Anyone know what's going on?
|
Not having worked with a multiselect listbox in awhile, my guess is that all the values are already comma seperated, and are being returned in the single sltChmcl parameter. Thus, only the first part of the if/else is getting executed, and then only once. You could verify this by putting Trace statements inside each part of the if/else.
If correct, then you don't even need the for; you could simply have (vapor code; I come from C# land):
Code:
ChmclsCSV = "'" & Request("sltChmcl").Replace(",", "','") & "'"