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:
Code:
ChmclsCSV = ""
For Each p In Request.Params.Keys
If p = "sltChmcl" Then
If ChmclsCSV.Length = 0 Then
ChmclsCSV = "'" & Request.Params(p).ToString() & "'"
Else
ChmclsCSV = ChmclsCSV & " , '" & Request.Params(p).ToString() & "'"
End If
End If
Next
Trace.Write("Chemicals List:" & ChmclsCSV)
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?