[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

Using CompareValidator to compare against Today's date

Jason Butera

1/21/2003 10:11:00 PM

Is there a way to do this? I tried system.datetime.today as the
ValueToCompare property, but the framework doesn't see this as script,
rather text. My textbox needs to be a valid date before today's date.
Thanks.
1 Answer

Julian

1/23/2003 4:22:00 PM

0

How about set the ValueToCompare in the Page_Load event, not at design time?


Protected void Page_Load(....){
xxx.ValueToCompare = DateTime.Now.ToString("dd/MM/yyyy");
}
"Jason Butera" <jjbutera@hotmail.com>
???????:509b03ca.0301200632.140ed20@posting.google.com...
> Is there a way to do this? I tried system.datetime.today as the
> ValueToCompare property, but the framework doesn't see this as script,
> rather text. My textbox needs to be a valid date before today's date.
> Thanks.