Monday 21 May 2012

Validating CheckboxList using Jquery

Below script is useful when you want to validate the checkboxlist control.
You just need to add below function on page.

<script language="javascript" type="text/javascript">
function CheckBoxList1_Validation(sender, args)
{
args.IsValid = false;
var cnt = $("#CheckBoxList1 input:checked").length;
args.IsValid = (cnt >= 3);
}
</script>


Post By : Dipen Shah
Blog By : Dipen Shah
Stay Tuned...

No comments:

Post a Comment