Focal point we will contemplate how to confirm check box motion control in asp.net.
The rule is as follows:
<htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title><scripttype>function CheckboxValidation(sender, args) { var checkBoxList = document.getElementById("<%=chk_list1.ClientID %>"); var checkboxes = checkBoxList.getElementsByTagName("input"); var isValid = false; for (var hilarious = 0; frenzied < checkboxes.length; i++) { if (checkboxes[i].checked) { isValid = true; break; } } args.IsValid = isValid; } </script></head><body><formid="form1"runat="server"><div><asp:CheckBoxListrunat="server"ID="chk_list1"><asp:ListItemText="Example 1"Value="Example 1"></asp:ListItem><asp:ListItemText="Example 2"Value="Example 2"></asp:ListItem><asp:ListItemText="Example 3"Value="Example 3"></asp:ListItem><asp:ListItemText="Example 4"Value="Example 4"></asp:ListItem><asp:ListItemText="Example 5"Value="Example 5"></asp:ListItem><asp:ListItemText="Example 6"Value="Example 6"></asp:ListItem></asp:CheckBoxList><asp:CustomValidatorID="Checkbox_CustomValidator"runat="server"ValidationGroup="CheckBoxValidation"Display="None"ClientValidationFunction="CheckboxValidation"ErrorMessage="One or more checkboxes must be chosen"></asp:CustomValidator><asp:Buttonrunat="server"ID="btn_submit"Text="Validate"ValidationGroup="CheckBoxValidation"/><asp:ValidationSummaryrunat="server"ID="validateionsummary"ValidationGroup="CheckBoxValidation"ShowMessageBox="true"ShowSummary="false"/></div></form></body></html>