RangeValidator strange bahavior

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MattB

    RangeValidator strange bahavior

    I have a range validator that I was setting the min/max values for
    programmaticall y, and I was getting the following runtime error when the
    page loads:

    The MaximumValue 181 cannot be less than the MinimumValue 8 of
    RangeValidator2

    Which looked odd (since 181 is indeed not less than 8 last I checked).
    So I tried just setting those same values directly in the validator and
    got the same result.

    So I tried a minimum of 8 and a max of 9 and it works. This is inside a
    WebControl, so maybe that has something to do with it. I'm also adding
    some Javascript to the controls being validated, so maybe that creates a
    conflict. Is there a limit I'm breaking or something? I don't get it,
    but I am emerging from a nasty virus, so maybe it's my brain that isn't
    working right.
    Any ideas? TIA

    Matt
  • Sergey Poberezovskiy

    #2
    RE: RangeValidator strange bahavior

    Check Type property of your validator - it looks that you use "String" type.

    HTH

    "MattB" wrote:
    [color=blue]
    > I have a range validator that I was setting the min/max values for
    > programmaticall y, and I was getting the following runtime error when the
    > page loads:
    >
    > The MaximumValue 181 cannot be less than the MinimumValue 8 of
    > RangeValidator2
    >
    > Which looked odd (since 181 is indeed not less than 8 last I checked).
    > So I tried just setting those same values directly in the validator and
    > got the same result.
    >
    > So I tried a minimum of 8 and a max of 9 and it works. This is inside a
    > WebControl, so maybe that has something to do with it. I'm also adding
    > some Javascript to the controls being validated, so maybe that creates a
    > conflict. Is there a limit I'm breaking or something? I don't get it,
    > but I am emerging from a nasty virus, so maybe it's my brain that isn't
    > working right.
    > Any ideas? TIA
    >
    > Matt
    >[/color]

    Comment

    Working...