I am trying to add a custom data-required attribute to an asp Checkbox control, it works fine for all other controls I\'ve used it on, but on checkboxs it renders the checkb
use InputAttributes
Here is the code I have used:
cb.InputAttributes.Add("data-group", "chkbox");
Then you can use JQuery to target all check-boxes.
$("*[data-group='chkbox']").prop("checked", true);