title: Get recordset value to display checkbox as checked
body: <p>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:</p>
  
  <pre><code>&lt;input type="checkbox" name="cbBatch&lt;%=vIndex%&gt;" id="cbBatch&lt;%=vIndex%&gt;" value="&lt;%If RS("batch") = 1 Then Response.Write " checked" End If%&gt;"&gt;
  </code></pre>
  
  <p>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?</p>
  
  <p>Thanks!</p>