CompareValidator not working

Discussion in 'ASP .Net' started by tshad, Dec 5, 2005.

  1. tshad

    tshad Guest

    The CompareValidator doesn't seem to work correctly.

    I have the following to compare 2 controls that are Currency and no matter
    what I enter, it seems to give me an error. I saw in the MSDN that Currency
    is supposed to allow decimals with Currency symbols ("A decimal data type
    that can contain currency symbols").

    If I have:

    WagesMin = $800.00
    WagesMax = $10,000.00

    or

    WagesMin = $10,000.00
    WagesMax = $800.00

    I still get the Validator message.

    I have the Validator set as:

    <asp:CompareValidator
    ControlToValidate="WagesMin"
    ControlToCompare="WagesMax"
    Operator="LessThanEqual"
    Type="Currency"
    Display="Dynamic"
    Text="<br>Minumum Wage must be less than or equal to the Maximum Wage"
    runat="server"/>

    Why doesn't this work?

    Thanks,

    Tom
     
    tshad, Dec 5, 2005
    #1
    1. Advertisements

  2. Patrick.O.Ige, Dec 6, 2005
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.