I have a checkbox called "cbBatch" on one of my pages. When i check the box and submit the form, "cbBatch" is stored with a value of 1. On the next page, I need cbBatch to be "checked" if the value in the corresponding database field is "1". If it's 0, then unchecked. I have attempted to write it like this:
<input type="checkbox" name="cbBatch<%=vIndex%>" id="cbBatch<%=vIndex%>" value="<%If RS("batch") = 1 Then Response.Write " checked" End If%>">
my database field is an integer, fyi. and this isn't working. I did a response.write to verify that the value of the checkbox is indeed 1, and it is. so i don't understand why this isn't working. What am I missing?
Thanks!