i knew you were going to ask that
try this:
<script type="text/javascript" language="javascript">
<!--
function CustomValidator1_ClientValidate(sender, args)
{
args.IsValid = (document.getElementById("CheckBox1").checked);
}
//-->
</script>
<asp:CustomValidator ID="CustomValidator1" runat="server"
ClientValidationFunction="CustomValidator1_ClientValidate"
ErrorMessage="Check the checkbox, eh"
OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
if you're using masterpages, the client-side control ID will be
different.
neil
that worked perfectly, thanks you
I may be pushing it a bit, but can you add a client side validate also in a
similar way?
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
you can use a customvalidator:
[c#]
protected void CustomValidator1_ServerValidate(object source,
ServerValidateEventArgs args)
{
args.IsValid = CheckBox1.Checked;
}
WebBuilder451 wrote:
I have a check box for a confirmation that a new member has read the terms
and conditions. This is an asp control, but can't seem to get a validator
control to reconize it. What is the best way to make this field so that it is
required to be checked?
asp.net 2.0)