<script type="text/javascript" language="javascript">
function ValidateCheckBox(src, args) {
if (document.getElementById('<%=chk_Terms.ClientID %>').checked == false) {
alert("Please check Terms & Conditions before continuing.");
//return false;
args.IsValid = false;
}
}
------------------------------------------------
<asp:CheckBox ID="chk_Terms" runat="server" CssClass="arial11normalblack" Text="I agree to the Terms & Cconditions" />
<asp:CustomValidator ValidationGroup="submit" ID="cv_Checkbox" runat="server" ClientValidationFunction="ValidateCheckBox"
Display="None" SetFocusOnError="True">*</asp:CustomValidator>
Sunday, October 3, 2010
Checkbox validation
Sunday, October 03, 2010 Posted by Vikas SharmaLabels: VALIDATIONS
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment