Question : Multiple selections in dropdown

I have a comma delimited list of Id's called "myIDS". It contains lists such as:
4,11,30,

I create an ASP dropdown list such as:

<select name="shipList" class="input" size="6" multiple>
<option value="4" >Name1</option>
<option value="11" >Name2</option>
<option value="30" >Name3</option>
<option value="34" >Name4</option>
<option value="26" >Name5</option>
<option value="8" >Name6</option>
<option value="13" >Name7</option>
</select>

I need to set the options in the dropdown to "Selected" if the value is in the comma delimited list = the values in the list. Keep in mind, the dropdown is generated dynamically from a DB.

Any ideas?

Answer : Multiple selections in dropdown

<%
dim myIDS
myIDS = "4,11,30,"
%>

In this case 4 will be selectetd but 14 and 41 will not

<option value="4" <% IF InStr(myIDS,"4") > 0 THEN response.write " selected" %>>Name4</option>
<option value="41" <% IF InStr(myIDS,"41") > 0 THEN response.write " selected" %>>Name41</option>
<option value="14" <% IF InStr(myIDS,"14") > 0 THEN response.write " selected" %>>Name14</option>
Random Solutions  
 
programming4us programming4us