RangeValidator always false?

  • Thread starter Thread starter jpabich
  • Start date Start date
J

jpabich

I have a range validator on my field to make sure it is a double. No
matter what I put in the field, it always comes back false. Why?

<asp:rangevalidator id="valgMessageMin" runat="server" CssClass="Error"
ControlToValidate="txtMessageMin" ErrorMessage="Must be a Number"
ForeColor=" " Type="Double"></asp:rangevalidator>
 
There is no range defined. It can be any number as long as it is a
number. I have other validators with no ranges defined that work just
fine. They are defined just the same as these.
 
I actually figured it out. The code is supposed to set the range
validators at run time and I wasn't calling that function. I called it
and it works now.
 
I understand but this is a rangevalidator and validates only on range not
only just numbers.
Put a range between 0 and 1000000.
Is it working then?
 

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

Back
Top