Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

validate a textbox; date

I have a textbox where a date is being entered.   I am using a CompareValidator to check that it's a date. See below.  However, I also want to make sure the date is NOT greater than the current date.     I believe I can also use a CompareValidator to do this; however, when I put two Compare Validators on the page that whose ControlToValidate property is the same text box, this does not seem to be allowed.

Any ideas on how I can do both checks?  


<asp:CompareValidator id="validator_client_dob1" runat="server" display="static" text="*" Type="Date" Operator="DataTypeCheck" ControlToValidate="client_dob" ErrorMessage="Invalid Client DOB.">
</asp:CompareValidator>
ASKER CERTIFIED SOLUTION
Avatar of YZlat
YZlat
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

ASKER

Thanks!