473,396 Members | 1,767 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.

CompareValidator won't validate

Hi,

I have added a CompareValidator to my .NET 2.0 web page and told it to
validate against Integers.

I set the ControlToValidate, the Text, Display (tried both Static and
Dynamic),the ErrorMessage, theType (integer), yet it still let's the value
'2233mm' go through.

What else do I need to do?

Nov 21 '07 #1
3 1176
cashdeskmac has brought this to us :
Hi,

I have added a CompareValidator to my .NET 2.0 web page and told it to
validate against Integers.

I set the ControlToValidate, the Text, Display (tried both Static and
Dynamic),the ErrorMessage, theType (integer), yet it still let's the value
'2233mm' go through.

What else do I need to do?
set Operator to DataTypeCheck

Hans Kesting
Nov 21 '07 #2
Sorry, Hans, I should also have mentioned that Operator was already set to
DataTypeCheck.

"Hans Kesting" wrote:
cashdeskmac has brought this to us :
Hi,

I have added a CompareValidator to my .NET 2.0 web page and told it to
validate against Integers.

I set the ControlToValidate, the Text, Display (tried both Static and
Dynamic),the ErrorMessage, theType (integer), yet it still let's the value
'2233mm' go through.

What else do I need to do?

set Operator to DataTypeCheck

Hans Kesting
Nov 21 '07 #3
Found the problem: I had a typo in the ValidationGroup property (one letter
was uppercase, it should have been lowercase).
Nov 26 '07 #4

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

Similar topics

1
by: Neo | last post by:
I use CompareValidator to validate a date. But CompareValidator can only one date format at one time. if the dateorder is "mdy", date format can only be mdy even if date format is ymd. But users...
2
by: Eric Maia | last post by:
I have a textbox (StartDateTextBox) in a UserControl on my page, that is supposed to have a date entered into it. I have a RequiredFieldValidator that has its ControlToValidate property set to the...
4
by: MattB | last post by:
I have a page that has gone through a lot of editing. It has many text box and validator controls, and one compare validator just isn't working. I have the control to validate set, and control to...
1
by: Chris Leffer | last post by:
Hi. I set a CompareValidator using DataTypeCheck = Integer to validate a textbox. When I type 199b on the textbox, the validator control accepts the value. If I set the same validator control...
3
by: CyberLotus | last post by:
Hi, I wish to validate the date a user has entered against the format dd-mmm-yyyy using the CompareValidator, but it does not work. Does anybody have a simple solution please? Many thanks...
1
by: Jason | last post by:
I have a textbox that I want to validate a textbox for a date like "01/01/2000 03:00PM" The below validates nicely for 01/01/2000. What's the easiest way to do this in asp.net 2.0 / vb.net? ...
0
by: Mirnes | last post by:
I would like to validate two controls so they can't be the same value so I used CompareValidator with operator "NotEqual" but I would like that CompareValidator doesn't validate if control value is...
1
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
Is there a way to validate a usercontrol's property from the page hosting the control using a comparevalidator control? such as? <asp:CompareValidator id="cvStartDate" runat="server"...
2
by: bogdan | last post by:
Is it possible to have a CompareValidator to compare values from two cells in a gridview row? I'd like to do that while in edit mode. Thanks, Bogdan
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.