Range Validator not behaving in ASP.NET 1.1

B

beasers

Hi
I can't find any other examples of this, but I have a simple text box
with an accompanying range validator set to Min 0 and Max 99999.

The validation works if I enter an illegal character like 'p', and the
validation works for negative values but 44444444 gets through (and I
am trace.writing the validation result so I know it's returning TRUE).
However 99999999 gets caught by the validation.

My suspicion is that the range validator is somehow treating the
entered value as a string rather than an integer, but I don't know why
this should be. Code is as follows, can anyone help pls pls?

<asp:TextBox id="txtMonthly" runat="server" Width="35px">0</
asp:TextBox>
<asp:RangeValidator id="RangeValidator1" runat="server"
ErrorMessage="RangeValidator" ControlToValidate="txtMonthly"
MaximumValue="99999" MinimumValue="0">Please enter a number between 0
and 99999</asp:RangeValidator>
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top