473,320 Members | 1,832 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,320 software developers and data experts.

Range Validator not behaving in ASP.NET 1.1

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>

Apr 18 '07 #1
0 1030

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

Similar topics

4
by: Fraggle | last post by:
Hi, I want to validate a text box, The user can leave it blank, or fill it in. If they fill it in then it must be a date within a certain range. How can I achieve this? Thank you very much
1
by: tshad | last post by:
I have been trying to set up a range validator and regular expression for my dates. I tried this: <asp:RangeValidator runat="server" ControlToValidate="AbsentFrom1" MinimumValue="12/31/1950"...
3
by: Joey | last post by:
I have a page with a range validator on it. I have the following set... ControlToValidate=txtSomeTextBox MinimumValue=1 MaximumValue=2000 Now, when I run the form, the values 1,2,10 all pass...
1
by: MattB | last post by:
I have a page with dual controls for a person to enter their height and weight. The dual controls are for English and metric units, and Javascript onChange events handle populating the other...
2
by: Tarun Mistry | last post by:
Hi everyone, i have a range validator set to date mode. However, I want the max date to be whatever it is right now, is there a way of setting this within the properties of the range validator? ...
45
by: Summercoolness | last post by:
it seems that range() can be really slow: the following program will run, and the last line shows how long it ran for: import time startTime = time.time() a = 1.0
0
by: Toco | last post by:
Hello. I have two calendar controls and wish to validate the timespan difference between them. Can this be accomplished using a range validator? Currently I'm validating the timespan on the...
5
by: =?Utf-8?B?Q2hyaXMgRA==?= | last post by:
Hi - I was hoping to use the range validator to check that the user's age is between 10 & 65 based upon an entered DOB. I thought I could use max&min date variables in the Validator & have those...
15
by: chicane | last post by:
I am using VS2008 and I trying to use the Range Validator for the following: I have a text box that a user will input a date into for an appointment - the date entered must be at least 7 days...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.