Hello all,

I am developing a Webpage that gives the user selection criterial before running a report. There is a asp.net ListBox that I need to get the selected values from. It is obviously a multi select listbox.

I need to pass the selected values as a comma separated string to a parameter used in an SQL query of the ObjectDataSource for the report. I was hoping some how to get the selected items, and load their value into a string array and then use the join( stringArray , "," ) to get the selected values into a string to send as a parameter to my objectdatasource but I cant seem to figure this out..

Ideally if code worked my way I would want to do something like this:

Declare StringArray

for each selected item in Mylistbox
Add selected value to StringArray

Set parameter = join( StringArray , "," )


Obviously this is what I need syntax for.. I pretty much just need to know how to get a string array or all selected values. Any ideas?