469,343 Members | 5,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

checkbox

I know this is gonna sound silly but when I submit a form with a checkbox
html control "mychk", how can I see if that is checked or not ?

I have tried :

if request.form("mychk") = true then
' code
else
' code
end if

But it always executes the code in the else statement meaning it is never
true despite the fact I have given the checkbox a value of true.


Jul 19 '05 #1
1 2904
MDB
Try if request.form("mychk") = "true" then

The checkbox is a string not a boolean value.


"Paul" <pa**@themedialounge.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I know this is gonna sound silly but when I submit a form with a checkbox
html control "mychk", how can I see if that is checked or not ?

I have tried :

if request.form("mychk") = true then
' code
else
' code
end if

But it always executes the code in the else statement meaning it is never
true despite the fact I have given the checkbox a value of true.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Fabri | last post: by
reply views Thread by mike | last post: by
2 posts views Thread by bebop | last post: by
5 posts views Thread by DotNetJunkies User | last post: by
2 posts views Thread by Adam Knight | last post: by
2 posts views Thread by Ceema M via DotNetMonster.com | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.