title: ASP .NET with MySQL - use TINYINT with asp:Checkbox
body: <p>For my ASP .NET webpage I am using a MySQL database with a TINYINT field to indicate a boolean (0/1) value.</p>
  
  <p>Thanks to stackoverflow I was able to read the field value into a Listview as a asp:Checkbox.</p>
  
  <pre><code> &lt;asp:CheckBox ID="freight_foundCheckbox" runat="server"
       Checked='&lt;%# Convert.ToBoolean(Eval("freight_found")) %&gt;'  /&gt;
  </code></pre>
  
  <p>What is challenging me now is how to reverse the transaction in the <strong>InsertItemTemplate</strong> or <strong>EditItemTemplate</strong>.</p>
  
  <p>The listview textbox reads as:</p>
  
  <pre><code>    &lt;asp:TextBox ID="freight_foundTextBox" runat="server" 
         Text='&lt;%# Bind("freight_found") %&gt;' /&gt;
  </code></pre>
  
  <p>How do I bind a asp:Checkbox value back into the database as a integer value?</p>