Validator error

T

tshad

I am getting the follwoing error on this validator and not sure what is
causing it.

Control 'RequestedStartDate' referenced by the ControlToValidate property of
'' cannot be validated

The Control and validator are:

<asp:TextBox ID="EERequestedStartDate" Columns="12" runat="server"/>
<asp:CompareValidator runat="server" ID="ValidateDate"
ControlToValidate="EERequestedStartDate"
Operator="GreaterThan"
Display="Dynamic"
Type="Date" text="<br>Invalid Start Date"/>

In my Page load routine I have the following:

ValidateDate.ValueToCompare = DateTime.Today.ToString("yyyy-MM-dd")

I was told that this was what I had to do to set this to compare on todays
date and make sure that whatever was input was greater.

What am I missing?

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top