Hi nauna,
I have created a sample. please take its reference.
HTML
<div>
<script type="text/javascript">
function CheckAll() {
var table = document.getElementById("cblFruits");
var checkboxes = table.getElementsByTagName('INPUT');
for (var i = 0; i < checkboxes.length; i++) {
if (!checkboxes[i].checked) {
alert('Check all 3 CheckBoxes.');
break;
}
}
}
</script>
<asp:CheckBoxList runat="server" ID="cblFruits">
<asp:ListItem Value="Apple" Text="Apple" />
<asp:ListItem Value="Orange" Text="Orange" />
<asp:ListItem Value="Grapes" Text="Grapes" />
</asp:CheckBoxList>
<br />
<asp:Button Text="Save" runat="server" ID="btnSave" OnClientClick="CheckAll();" />
</div>
Screenshot