[thelist] Form validation using ASP
Brian Cummiskey
brian at hondaswap.com
Mon Mar 12 14:10:27 CDT 2007
Kevin Stevens wrote:
> but the check boxes
> are un-ticked,
change
<input type="checkbox" name="vest"
value="<%=Session("vest")%>">
to:
<input type="checkbox" name="vest"
<% if Session("vest") <> "" then response.write "checked=""checked""" end if %>">
> the text areas are blank, and the dropdowns go back to
> their original Select setting.
change:
<select name="number" id="number"
value="<%=Session("number")%>">
<option>Select</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
to
<select name="number" id="number">
<option>Select</option>
<option value="1" <% if Session("number") ="1" then response.write"selected=""selected""" end if %>
>1</option>
<option value="2" <% if Session("number") ="2" then response.write"selected=""selected""" end if %>
>2</option>
<option value="3" <% if Session("number") ="2" then response.write"selected=""selected""" end if %>
>3</option>
</select>
More information about the thelist
mailing list