Hi,
I have a Repeater where each row (Repeater item) contains a Checkbox and two
Textboxes. The first Textbox has a RequiredFieldVa lidator and everything work
fine. The other should only validate if the Chekbox is checked. To achieve
this I've added a CustomValidator , set the ControlToValida te to the id of the
Textbox and set a OnServerValidat e handler. But once the OnServerValidat e
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 valReqErrorMess age_ServerValid ate(object source,
ServerValidateE ventArgs 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 RequiredFieldVa lidator and everything work
fine. The other should only validate if the Chekbox is checked. To achieve
this I've added a CustomValidator , set the ControlToValida te to the id of the
Textbox and set a OnServerValidat e handler. But once the OnServerValidat e
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 valReqErrorMess age_ServerValid ate(object source,
ServerValidateE ventArgs args)
{
//Only validate args.Value if "chb" is selected ... ?
}
Thanks in advance
Richard