I have three textboxes on an asp.net webform, how/can I use a required field validator to ensure that at least one of them contains text?
I would use a CustomFieldValidator like this:
and then in your codebehind you have:
protected void MyCustomValidator_ServerValidate(object source, ServerValidateEventArgs args)
{
if (/* one of three textboxes has text*/)
args.IsValid = true;
else
args.IsValid = false;
}
You can also add a Client-side component to this validation, and make it sexy by extending it with AJAX toolkit's ValidatorCalloutExtender control.