title: Input control type Checkbox always true
body: <p>I have searched all the topics discussing this issue and cant seem to find one that explains the issue using Asp.net C#, everything is either javascript or MVC or PHP my reasoning for opening a new question regarding this.</p>
  
  <p>I have 2 input control type checkbox</p>
  
  <pre><code>&lt;input runat="server" type="checkbox"  name="chkChildSexMale" id="chkChildSexMale" /&gt;
  &lt;input runat="server" type="checkbox" name="chkChildSexFemale" id="chkChildSexFemale"/&gt;
      &lt;asp:Button ID="btnSaveCheckBoxes" runat="server" Text="Save CheckBox" OnClick="btnSaveCheckBoxes_Click" /&gt;
  </code></pre>
  
  <p>*<strong><em>EDITED</em>**</strong>   </p>
  
  <pre><code>protected void SaveCheckBoxes()
  {
    if (chkChildSexMale.Checked)
        {
            do something
        }
        else if (chkChildSexFemale.Checked)
        {
            do something else
        }
  
  }
  </code></pre>
  
  <p>Then in my button click event I call this method</p>
  
  <pre><code>protected void btnSaveCheckBoxes_Click(object sender, EventArgs e)
  {
  SaveCheckBoxes();
  }
  </code></pre>