Posted on: 8/7/2013 8:04:12 PM | Views : 327

I have a "Date" type rangevalidator tied to a textbox control.  I want to set the maximumvalue and minimumvalue properties of the validator (not in code behind, but in the properties of the control in design mode).  I want the maximumvalue to be today's date (whatever day the user uses the form) and today's date minus 15 years.  I have tried the following:
DateTime.Now
DateTime.Now.AddYears(-15)
But the page throws the error:
The value 'DateTime.Now' of the MaximumValue property of 'RangeValidator1' cannot be converted to type 'Date'.
What should I put into the propeties to accomplish what I am after?  Thanks for any help.
...

Go to the complete details ...