you would have your option values in a array and response.write them on with a loop and check each value as the loop iterates.
Code:
<%
dim value_array(3)
value_array(0) = "zero"
value_array(1) = "one"
value_array(2) = "two"
value_array(3) = "three"
<select ... >
<%
with response
for i = 0 to ubound(value_array)
.write "<option value="
.write chr(34)
.write value_array(i)
.write chr(34)
if value_array(i) = select_value then
.write " selected ="
.write chr(34)
.write "selected"
.write chr(34)
end if
.write ">"
.write value_array(i)
.write "</option>"
next
end with
%>
</select>
not tested coded on the fly
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|