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>
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>