Validating multiple controls

Is there a way to have the custom validator take the input from two controls, say for example two check boxes and make sure that only one is checked?Or am I going about this all wrong, and more importantly if I am could you point me in the right direction?Being a postcode you will know from the length that both have been filled.Alternatively, in any other case when the length cannot determine whether or not both textboxes have been filled, you would have javascript write out the textbox only if both contain text.1) We are still runing 2.0 here with no hope of upgrading anytime soon, and the 2.0 version of the toolkit is no longer available.2) I have to use standard html input tags rather than the checkbox controls.If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.

I have 2 textboxes, I need to make sure at least one textbox has a value in it.

One thought is to have a hidden textbox that gets poulated by javascript with the text from both textboxes.

Then set the required field validator to validate this.

Plz correct me if i m wrong Thank u Baba Please remember to click "Mark as Answer" on this post if it helped you.

Hi Danny, I know this is a late reply but it might help others.

Search for validating multiple controls:

validating multiple controls-50validating multiple controls-26validating multiple controls-89validating multiple controls-2

I'll look into using the AJAX Control Toolkit, and let you know how it works.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating multiple controls”

  1. Essentially, if you left out the supernatural and fantastical elements of the story, you'd still be left with a good tale about the challenges faced by a transsexual boy dealing with life in a girl's body.