checkbox

P

Paul

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.
 
M

MDB

Try if request.form("mychk") = "true" then

The checkbox is a string not a boolean value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top