473,725 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET 2.0: CompareValidato r problem

Hello,
I am learning ASP.NET 2.0 and I have a problem with CompareValidato r
control. On .aspx page I have a control:

Date of birth: <asp:TextBox ID="BirthDate" runat="server"
ValidationGroup ="BirthDate" />

It works fine, but when I add CompareValidato r with Type:

<asp:CompareVal idator ID="BirthDateVa lidator" runat="server"
ValidationGroup ="BirthDate" ControlToValida te="BirthDate" Type="Date"
Text="Enter birth date!" />

Then I have a problem that page is not displayed - Application_Err or()
is generated.
Could you help me please to write it correctly?
Thank you!
/RAM/
Jun 21 '06 #1
1 1412
Hi,
You must set this Property ControlToCompar e, When you are using
CompareValidato r.
Thanx,

Poornima
www.syncfusion.com

ASP.Net FAQ:
http://www.syncfusion.com/faq/aspnet/default.aspx
ASP.Net controls and components
http://www.syncfusion.com/toolsweb
"R.A.M." <r_********@poc zta.onet.pl> wrote in message
news:j5******** *************** *********@4ax.c om...
Hello,
I am learning ASP.NET 2.0 and I have a problem with CompareValidato r
control. On .aspx page I have a control:

Date of birth: <asp:TextBox ID="BirthDate" runat="server"
ValidationGroup ="BirthDate" />

It works fine, but when I add CompareValidato r with Type:

<asp:CompareVal idator ID="BirthDateVa lidator" runat="server"
ValidationGroup ="BirthDate" ControlToValida te="BirthDate" Type="Date"
Text="Enter birth date!" />

Then I have a problem that page is not displayed - Application_Err or()
is generated.
Could you help me please to write it correctly?
Thank you!
/RAM/

Jun 22 '06 #2

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

Similar topics

1
6395
by: edi | last post by:
Hi, Are there any differences between CompareValidator.ControlToCompare and CompareValidator.ControlToValidate? For example if I have TextBox controls: TextBox1 and TextBox2 what are the differences between: CompareValidator.ControlToCompare=TextBox1, CompareValidator.ControlToValidate=TextBox2 and CompareValidator.ControlToValidate=TextBox1, CompareValidator.ControlToCompare=TextBox2?
0
1000
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! See datagrid code below: <asp:DataGrid id="gridProducts" ....>
4
2442
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 the error on my webserver.) TIA, Axel Dahmen --
2
3195
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 textbox. I also have a CompareValidator pointed to the textbox with its Type="Date." Despite all documentation to the contrary, I am getting an exception when the page first loads that is thrown by the CompareValidator, complaining that it...
1
1741
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 no value in the field it throws an error. If I put a number in the form submits fine, and a non-numeric will trigger the validation. But blank causes the nasty error page to come up with the error " Input string was not in a correct format." ...
0
1328
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: System.Threading.Thread.CurrentThread.CurrentUICulture = SelectedCulture; the problem is that I use a CompareValidator on dates:
1
1456
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: <asp:TextBox ID="BirthDate" runat="server" /> <asp:CompareValidator ID="BirthDateValidation" runat="server" ControlToValidate="BirthDate" Type="Date" Text="Enter date of birth!" /><br />
0
1034
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: <asp:TextBox ID="BirthDate" runat="server" /> <asp:CompareValidator ID="BirthDateValidation" runat="server" ControlToValidate="BirthDate" Type="Date" Text="Enter date of birth!" /><br />
1
1314
by: R.A.M. | last post by:
Hi, I am learning .NET 2.0 and I have a problem with asp:CompareValidator. On .aspx page I have: Birth date: <asp:TextBox ID="BirthDate" runat="server" ValidationGroup="BirthDate"/> and it works fine; but when I add:
0
8888
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9174
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8096
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4782
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2634
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.