Using a Validator to Validate a Check Box

I. If you are using static, page written, ebcontrols..::..
1) add a check box to the page named “chkTandCs”
<script language=”javascript” type=”text/javascript”>
function ValidateTandCs(source, args)
args.IsValid = document.getElementById(‘<%= chkTandCs.ClientID %>’).checked;
<asp:customvalidator id=”valTandCs” clientvalidationfunction=”ValidateTandCs” runat=”server” errormessage=”Please accept Terms and Conditions before submitting.”><asp:CustomValidator>
II. If you are using Dynamic WebControls that are generated on the fly ..::..