i have a update page the pulles date form a database. and two the these
fields have Y or N in them and if the RS("Value") = Y the i want the
checkbox to be checked how do i do this??

Re: checkbox by Ken

Ken
Sun Jan 04 22:01:38 CST 2004

<% If objRS("Value") = "Y" then %>
<input type="checkbox" name="chk1" value="hello" checked>
<% Else %>
<input type="checkbox" name="chk1" value="hello">
<%End If %>

is one way.

Another way would be:

<%
strChecked = ""
If objRS("Value") = "Y" then strChecked = "checked"
%>

<input type="checkbox" name="chk1" value="hello" <%=strChecked%>>

Cheers
Ken


"Darren Spooner" <DCSpoon@hotmail.com> wrote in message
news:ODyDFdz0DHA.1700@TK2MSFTNGP12.phx.gbl...
: i have a update page the pulles date form a database. and two the these
: fields have Y or N in them and if the RS("Value") = Y the i want the
: checkbox to be checked how do i do this??
:
: