473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

RangeValidator always false?

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>

Sep 13 '06 #1
4 4326
What is the range you want to validate on??

MaximumValue="2" MinimumValue="0"

"jpabich" <jp*****@eisincorporated.comschreef in bericht
news:11**********************@i3g2000cwc.googlegro ups.com...
>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>

Sep 13 '06 #2
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.
Klaas wrote:
What is the range you want to validate on??

MaximumValue="2" MinimumValue="0"

"jpabich" <jp*****@eisincorporated.comschreef in bericht
news:11**********************@i3g2000cwc.googlegro ups.com...
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>
Sep 13 '06 #3
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.

jpabich wrote:
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.
Klaas wrote:
What is the range you want to validate on??

MaximumValue="2" MinimumValue="0"

"jpabich" <jp*****@eisincorporated.comschreef in bericht
news:11**********************@i3g2000cwc.googlegro ups.com...
>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>
>
Sep 13 '06 #4
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?

"jpabich" <jp*****@eisincorporated.comschreef in bericht
news:11*********************@i42g2000cwa.googlegro ups.com...
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.
Klaas wrote:
>What is the range you want to validate on??

MaximumValue="2" MinimumValue="0"

"jpabich" <jp*****@eisincorporated.comschreef in bericht
news:11**********************@i3g2000cwc.googlegr oups.com...
>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>

Sep 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: charliewest | last post by:
I've configured a RangeValidator control on a WebForm, using ASP.NET, and have set the type to string, the max value to 100, and min value to 1, however, the control to validate always throws an...
2
by: Johannes Hammersen | last post by:
Hi, when I try to set the Minimum Date on a RangeValidator to 01.01.0001 I get an error, that 01.01.0001 can not be converted to a date. But the DateType can be 01.01.0001....
2
by: Lucas Tam | last post by:
Hi all, I have a RangeValidator that is not working correctly - it is always returning a isValid = False. The Javascript is returning this as well as on the server side. My RangeValidator...
3
by: hooterbite | last post by:
The range validator works, the compare validator doesn't. Dim txbNew As New TextBox txbNew.ID = "txb" & arStyles(i) Dim rvNew As New RangeValidator rvNew.Text = "Must be a number greater then...
1
by: COHENMARVIN | last post by:
I'm trying to get a rangevalidator to work. Normally this is easy, but here I'm trying to make the rangevalidator check a range that is from variables. Here is the code. Its simple, but it...
11
by: Axel Dahmen | last post by:
Hi, I'm working in a team developing an international website. When I set the page's CultureInfo to Hungarian (hu-HU) then the RangeValidator doesn't seem to be able to parse a TextBox's date...
4
by: jiznena | last post by:
i wanna use RangeValidator but it always returns false,even i give the right numbers <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TextBox1" ...
1
by: Cirene | last post by:
Here's my RangeValidator <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtSVDV" ErrorMessage="RangeValidator" MaximumValue="0" MinimumValue="-100" Type="Double">Make...
0
by: Andrew Han | last post by:
I have a simple textbox where a user can enter a numeric value. The RangeValidator works perfectly well to determine if the value is a number of whatever type I specify AND to determine if the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.