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/