Posted on: 4/8/2014 12:33:09 PM | Views : 398

Here is my code.
<script type="text/javascript" lang="javascript"> function validate(source, args) { alert('hello......');....control not coming here var checkboxlist = document.getElementById('<%=chkServices.ClientID%>'); var checklistinput = checkboxlist.getElementsByTagName("input");
for (var i = 0; i < checklistinput.length; i++) { if (checklistinput[i].checked) { args.Isvalid = true; return; } }
args.Isvalid = false; }
</script>

<asp:CheckBoxList ID="chkServices" runat="server" Width="250px" RepeatDirection="Horizontal"> </asp:CheckBoxList>
<asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="validate" ErrorMessage="Please Select At Least One Checkbox." ForeColo ...

Go to the complete details ...