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

Can you validate a usercontrol property with a CompareValidator?

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" ControlToValidate="how
to reference a usercontrol's property here??"
Operator="DataTypeCheck" Type="Date" ErrorMessage="Please enter a valid start
date mm/dd/yyyy)." EnableClientScript="False">
</asp:CompareValidator>
Mar 25 '08 #1
1 1883
no. use the CustomValidator instead.

-- bruce (sqlwork.com)
"Dave" wrote:
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" ControlToValidate="how
to reference a usercontrol's property here??"
Operator="DataTypeCheck" Type="Date" ErrorMessage="Please enter a valid start
date mm/dd/yyyy)." EnableClientScript="False">
</asp:CompareValidator>
Mar 25 '08 #2

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

Similar topics

2
by: Grey | last post by:
I want to know that how to valiate date input from ASP.NET? can i use custom validator? if so, how to.. Million Thanks.
6
by: RSB | last post by:
Hi Every one Need some help to Validate the Date i have in the Form. ALso how to Convert the Date Data i read from table to yyyy/MMM/dd format. Thanks RSB
7
by: RSB | last post by:
Hi every one, how do i check the text box that one can only enter the numeric Digits. i have the maxlength of the Text box as 6. so one way i thought was to validate the Number between 0 and...
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...
7
by: James P. | last post by:
Hello there, In my asp.net page using VB, I have a date text field in mm/dd/yyyy format. When a date is entered, I'd like to validate it to make sure the date is greater than or equal to the...
4
by: Fernando Lopes | last post by:
Hi. I have a page with a usercontrol. In this UC, I have two ListBoxes and two buttons. When i click in one button, i get the selected item in the listbox. How can i validate, using validators,...
2
by: Peter | last post by:
I need to validate 4 fields on ASP.NET web page Starting Date __/__/____ Starting Time __:__ Ending Date __/__/____ Ending Time __:__ Staring Date + StartingTime...
2
by: David C | last post by:
I have a DropDownList control that has a value of 0 for not selected and a -1 for adding a new company. I want to be able to validate to say that this selected value is not 0 or -1 but I couldn't...
3
by: Max2006 | last post by:
Hi, I have a user control that has a property named "Text" Is there any way that I use a RequiredFieldValidator or CompareValidator to validate my user control's value? I tried it and I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
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...
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)...
1
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...
1
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....

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.