Hi Shaiwal,
Thanks for your reply. I am able to validate dropdown with checkboxes control by following your code as reference. Below is the code which i used.
<script type="text/javascript">
function Validate() {
var ddl = document.getElementById('<%=DropDownCheckBox.ClientID%>'); // Replace DropDownCheckBox with your Control Id
var checkedCount = 0;
for (var i = 0; i < ddl.children.length; i++)
{
if (ddl.children[i].type == 'checkbox') {
if (ddl.children[i].checked)
{
checkedCount = checkedCount + 1;
break;
}
}
}
if (checkedCount > 0) {
return true;
}
else {
alert('Please Select atleast one checkbox');
return false;
}
}
</script>
<asp:Button ID="Button1" runat="server" Text="Validate" OnClientClick="return Validate()" />
Thanks a lot
-Narender