David Tunnell
David Tunnell

Reputation: 7532

range validator disallowing some values within range

I have a textbox with a range validator that is acting odd:

<asp:TextBox ID="hoursInput" runat="server"></asp:TextBox>
<asp:RangeValidator ID="rangeValidator2" runat="server" ControlToValidate="hoursInput" MaximumValue="200" MinimumValue="0" ForeColor="Red" ErrorMessage="!!!" />

As you can see my goal is to allow the range 0-200 however the values 3-99 are causing the error message to go off and prevent the user from submitting.

Upvotes: 0

Views: 71

Answers (1)

Albert Laure
Albert Laure

Reputation: 1722

give the Type as Integer in your RangeValidator

<asp:RangeValidator  Type=Integer  ....

Upvotes: 0

Related Questions