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

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top