How to validate one control based on the truth value of another validator?

  • Thread starter Thread starter antonyliu2002
  • Start date Start date
A

antonyliu2002

Suppose that I have the following on my web:

Your annual income:
o > o < ___________


If the user enters a number in the textbox indicated by the underline,
but forget to click either of the two radio buttons for ">" and "<", I
want to warn the user that if he does supply a (valid) number for the
annual income information, he must check one radio button.

How do I do this? It looks like that I have to check the truth value
of the TextBox validator inside the RadioButtonList validator.

Could any of you share your experience with me? Thanks.

If you think that this idea can be implemented in a better way, please
educate. Thanks.
 
Custom Validator on the textbox. Check it's value and then check the two
radio's. It's a manual process but it's what you'll probably have to do.
 
Back
Top