ianj
04-14-2009, 06:52 PM
Hi All,
I am trying to populate a multi select dropdown from a string which comes from a database.
It works putting in the values in the format below into the database, but my problem is that they need to be able to amend the values, so I need to reverse the process. So I need the values to be show as they selected it in the first place then allow them to update them.
The string is as follows 13,14,15,16,17,99
The code on the asp page is as follows,
<select multiple="multiple" name="Region" size="2" >
<option value="">Select Region</option>
<%
While (NOT rsRegions.EOF)
vIDRegion = rsRegions.Fields.Item("IDRegions").Value
vRegion = rsRegions.Fields.Item("Region").Value
%>
<option value="<%=(vIDRegion)%>"><%=(vRegion)%></option>
<% If vfrmerror = 1 and vRegion = "" Then Response.Write("<span class = ""bodyRedlargeText"">*</span> ")%>
<%
rsRegions.MoveNext()
Wend
%>
</select>
Can anyone advise the best way to do this please.
Many thanks in advance
I am trying to populate a multi select dropdown from a string which comes from a database.
It works putting in the values in the format below into the database, but my problem is that they need to be able to amend the values, so I need to reverse the process. So I need the values to be show as they selected it in the first place then allow them to update them.
The string is as follows 13,14,15,16,17,99
The code on the asp page is as follows,
<select multiple="multiple" name="Region" size="2" >
<option value="">Select Region</option>
<%
While (NOT rsRegions.EOF)
vIDRegion = rsRegions.Fields.Item("IDRegions").Value
vRegion = rsRegions.Fields.Item("Region").Value
%>
<option value="<%=(vIDRegion)%>"><%=(vRegion)%></option>
<% If vfrmerror = 1 and vRegion = "" Then Response.Write("<span class = ""bodyRedlargeText"">*</span> ")%>
<%
rsRegions.MoveNext()
Wend
%>
</select>
Can anyone advise the best way to do this please.
Many thanks in advance