MSDN - date validation - cant work for me

lsemun

New member
Joined
Jun 15, 2003
Messages
1
hi,

i would like to validate date input which cannot be later than today
using compare validator. i try to use this method :

asp:CompareValidator id=c1
ValueToCompare=<%# DateTime.Today.ToShortDateString() %>
ControlToValidate="txtBirthDate"
Operator="LessThan" Type="Date"
Text="*" runat="server"

PLS HELP ME <+_+>
this method was provided by MSDN but the problem is i cant get todays
date bind into the valueToCompare using the above method.
 


Write your reply...
Back
Top