Hello everybody.
i have a checkbox which is in a usercontrol and the usercontrol is in an wizardcontrol and the wizardcontrol is on a content page which has a masterpage.
the checkbox must be checked before the wizard controls finishes. the checkbox and the customvalidator are on the last step of the wizardcontrol.
now everything works fine with firefox and when i test it also with ie. but somehow other people may be able to go on with the proces without having to check the checkbox. the checkbox also has a togglebutton extender. i hope that that is not a problem.
my inline javascript (in the usercontrol)
<script language="javascript" type="text/javascript">
// <![CDATA[
function ValidateTandCs(source, args)
{
args.IsValid = document.getElementById('<%= cbAV.ClientID %>').checked;
}
// ]]>
</script>
the checkbox:
<asp:checkbox id="cbAV" runat="server"/>
the customevalidator and togglebutton extender
<asp:CustomValidator
ID="rfvAV"
Display="Dynamic"
runat="server"
ControlToValidate="cbAV"
ErrorMessage="RequiredFieldValidator"
ClientValidationFunction="ValidateTandCs"
onservervalidate="rfvAV_ServerValidate">
</asp:CustomValidator>
<ajaxToolkit:ToggleButtonExtender
ID="tbeav"
runat="server"
TargetControlID="cbAV"
ImageHeight="15"
ImageWidth="15"
CheckedImageUrl="~/images/checkbox-on.gif"
UncheckedImageUrl="~/images/checkbox-off.gif" />
the code behind of the customvalidator
protected void rfvAV_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = (cbAV.Checked);
}
i have tried to remove the clientside validation from the customvalidator, but when i only have the server validation. it doesn't work