I wrote this bit of code to set the value of a checkbox called chkAdmin.
dim intChkVal
if Session("admin" = true then
intChkVal="-1"
Response.Write intChkVal
Response.Write "<input type = checkbox id = chkAdmin name = chkAdmin checked value=" & intChkVal & ">"
else
intChkVal="0"
Response.Write intChkVal
Response.Write ("<input type = checkbox id = chkAdmin name = chkAdmin value=" & intChkVal & ">"
end if
When the form is submitted, I want to request the value of that checkbox so it is recorded to a yes/no field in my database. I did this via the following code:
Session("Admin" = Request.Form ("chkAdmin.value"
when the form is submitted, I keep getting a data mismatch error b/c the information (0 or -1) is not getting passed into my update sql. It keeps showing as a blank.
I suspect that my logic is ok, but that i have a syntax error somewhere. I can't seem to get it to work - can anyone see where I have gone wrong?
Thanks. How much more water would there be in the ocean if it weren't for sponges?
dim intChkVal
if Session("admin" = true then
intChkVal="-1"
Response.Write intChkVal
Response.Write "<input type = checkbox id = chkAdmin name = chkAdmin checked value=" & intChkVal & ">"
else
intChkVal="0"
Response.Write intChkVal
Response.Write ("<input type = checkbox id = chkAdmin name = chkAdmin value=" & intChkVal & ">"
end if
When the form is submitted, I want to request the value of that checkbox so it is recorded to a yes/no field in my database. I did this via the following code:
Session("Admin" = Request.Form ("chkAdmin.value"
when the form is submitted, I keep getting a data mismatch error b/c the information (0 or -1) is not getting passed into my update sql. It keeps showing as a blank.
I suspect that my logic is ok, but that i have a syntax error somewhere. I can't seem to get it to work - can anyone see where I have gone wrong?
Thanks. How much more water would there be in the ocean if it weren't for sponges?