C and S Design.
Search Friendly Programming and Design



Get this Code: Click to download the ASP file.
Do not copy and paste the displayed code. The display function adds line breaks so what you see is definitely not what you would get.

Code for this Example. (Show Hide Layers)

<%
dim i
dim select_value
dim value_array(3)
value_array(0) = "zero"
value_array(1) = "one"
value_array(2) = "two"
value_array(3) = "three"

select_value = request.form("test_select")
%>

<form action="default.asp" _ 
	method="post" name="test_form">
<select name="test_select" _ 
	id="test_select">
<option value="-1">Select From</option>
<%
with response
for i = 0 to ubound(value_array)
.write "<option value="
.write chr(34)
.write i
.write chr(34)
if i = cint(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>
<input type="submit" name="submit" _ 
	id="submit" value="Ok">
</form>



Valid HTML 4.01! Valid CSS! copyright © C and S Design 2004 - 2005
Website Design and SE Friendly Coding C and S Design