G
Guest
Hi,
I have a Repeater where each row (Repeater item) contains a Checkbox and two
Textboxes. The first Textbox has a RequiredFieldValidator and everything work
fine. The other should only validate if the Chekbox is checked. To achieve
this I've added a CustomValidator, set the ControlToValidate to the id of the
Textbox and set a OnServerValidate handler. But once the OnServerValidate
code behind method fires I can't find a good solution on how to find the
checkbox in that Repeater item.
Any ideas?
protected void valReqErrorMessage_ServerValidate(object source,
ServerValidateEventArgs args)
{
//Only validate args.Value if "chb" is selected ... ?
}
Thanks in advance
Richard
I have a Repeater where each row (Repeater item) contains a Checkbox and two
Textboxes. The first Textbox has a RequiredFieldValidator and everything work
fine. The other should only validate if the Chekbox is checked. To achieve
this I've added a CustomValidator, set the ControlToValidate to the id of the
Textbox and set a OnServerValidate handler. But once the OnServerValidate
code behind method fires I can't find a good solution on how to find the
checkbox in that Repeater item.
Any ideas?
protected void valReqErrorMessage_ServerValidate(object source,
ServerValidateEventArgs args)
{
//Only validate args.Value if "chb" is selected ... ?
}
Thanks in advance
Richard