Range validator for dates.

ansrikanth

New member
Joined
Oct 8, 2006
Messages
4
Programming Experience
1-3
Hi all,

Im having a problem with range validator..Im not getting how to use this to validate a date which is coming from another page (I think ihave to say through a session variable). i.e to check wether the date falls between "TODAY" and "Today+1Year"

for this ..I wrote the code like ..(Under page load event)

RangeValidator1.MinimumValue = DateTime.Today
RangeValidator1.MaximumValue = DateTime.Today.AddYears(1)
RangeValidator1.Type = ValidationDataType.Date ...

even i placed this ..Im not getting the correct result..where do im doing wrong..

FYI : I had placed EnableEventValidation="false" in the first line of the page.Else it was showing an error message

Early help in this regard will be greatly help full.
 
Back
Top