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

Discussion in 'ASP .Net' started by antonyliu2002@yahoo.com, Oct 12, 2005.

  1. Guest

    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.
    , Oct 12, 2005
    #1
    1. Advertising

  2. RE: How to validate one control based on the truth value of another va

    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.

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com



    "" wrote:

    > 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.
    >
    >
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=, Oct 12, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Drew
    Replies:
    0
    Views:
    462
  2. leon
    Replies:
    0
    Views:
    423
  3. Mufasa
    Replies:
    3
    Views:
    327
    Mufasa
    Aug 13, 2007
  4. Robert Cohen
    Replies:
    3
    Views:
    255
    Andrew Durstewitz
    Jul 15, 2003
  5. TeknoShock
    Replies:
    1
    Views:
    148
Loading...

Share This Page