title: how to put validation for checkbox in asp.net?
body: <pre><code>&lt;tr&gt;
      &lt;td&gt;
          &lt;asp:CheckBox ID="checkdoc" runat="server" Checked="false" /&gt;:Document
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:CheckBox ID="checktwocheque" runat="server" Checked="false" /&gt;:Two Cheques
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:CheckBox ID="checkIdprf" runat="server" Checked="false" /&gt;:ID Proof
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;
          &lt;asp:CheckBox ID="checkpancrd" runat="server" Checked="false" /&gt;:PAN Card
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:CheckBox ID="checkAddrssprf" runat="server" Checked="false" /&gt;:Address Proof
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td colspan="4" align="center"&gt;
          &lt;asp:Button ID="btnfarmrecordsave" runat="server" Text="Save" OnClientClick="return Validations();" OnClick="btnfarmrecordsave_Click" /&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>I have written code like this for choosing at least one <code>checkbox</code>. How can I write code for validation in javascript?. I want to display one message "Please select at least one checkbox" if user hasn't selected any checkbox?</p>