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

2.0: CompareValidator with Type

Hello,
(Sorry for my English...)
Could you help me please? I have a problem with CompareValidator
control which makes the load of my page infinitive. Here's the code:

Date of birth: <asp:TextBox ID="BirthDate" runat="server" />
<asp:CompareValidator ID="BirthDateValidation" runat="server"
ControlToValidate="BirthDate" Type="Date"
Text="Enter date of birth!" /><br />

Without CompareValidator pages loads correctly. After adding this
control load process does not end.
Could you explain me the problem please?

Thank you very much!
/RAM/
Apr 26 '06 #1
1 1443
You need to set the Operator property as DataTypeCheck for the
CompareValidator to work.
Also remember the CompareValidator will not be fired if your textbox is left
empty. You will be better off adding the requiredfieldvalidator in addition
to the CompareValidator

HTH

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services


"R.A.M." <r_********@poczta.onet.pl> wrote in message
news:r1********************************@4ax.com...
Hello,
(Sorry for my English...)
Could you help me please? I have a problem with CompareValidator
control which makes the load of my page infinitive. Here's the code:

Date of birth: <asp:TextBox ID="BirthDate" runat="server" />
<asp:CompareValidator ID="BirthDateValidation" runat="server"
ControlToValidate="BirthDate" Type="Date"
Text="Enter date of birth!" /><br />

Without CompareValidator pages loads correctly. After adding this
control load process does not end.
Could you explain me the problem please?

Thank you very much!
/RAM/

Apr 26 '06 #2

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

Similar topics

0
by: Sjaakie Helderhorst | last post by:
Hi, Somehow pushing an image-button doesn't trigger the CompareValidator, resulting in errors when entering string characters. Could someone please tell me what I did wrong? Thanks in advance!...
4
by: Axel Dahmen | last post by:
Hi, I've got the same problem as described below. No answer found yet. Can someone please help? (I'm using .NET 1.0 on my development machine and 1.1 on my webserver. Like Susanna, I only get...
1
by: Keith Spitz | last post by:
The following works... <asp:CompareValidator Runat="server" ControlToValidate="txtValue" Text="*" ErrorMessage="The value you provided is not of the correct type." Operator="DataTypeCheck"...
1
by: Joe | last post by:
Hello, I am new to asp.net. I have created a login page using dotnet. I am using CompareValidator but noticed that when I click on View Source in the browser I see the value assigned to...
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...
1
by: Ron Weldy | last post by:
I want to have a optional field on a form that can be blank but if the user enters something, it must be a number. I'm using a CompareValidator with the datatype check but if I submit the form with...
0
by: gauthier | last post by:
Hi, I'm developing a web application available in multiple languages. When we switch language (via a drop down list), we switch the culture of the current thread: ...
0
by: R.A.M. | last post by:
Hello, (Sorry for my English...) Could you help me please? I have a problem with CompareValidator control which makes the load of my page infinitive. Here's the code: Date of birth:...
1
by: R.A.M. | last post by:
Hello, I am learning ASP.NET 2.0 and I have a problem with CompareValidator control. On .aspx page I have a control: Date of birth: <asp:TextBox ID="BirthDate" runat="server"...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.