Ajax calender
i want to insert date from user i want to validate the user to only select date upto current date ,he have selected past date not future date but if user selected future date i.e tomorrows date then it generated error
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Deepak Kumar ChoudharyRank #4,523 · 339 reputationPosted Oct 1, 2014, 3:05 AM EDT
1. Following code for textbox
2.Following code for Reange Validator
ErrorMessage="Date Can't be Greaer Than Current Date"
style="color: #FF0000; font-weight: 700" Type="Date" ValidationGroup="r">
3.After puting textbox and rangevalidator on the page now write code inside the page_load event
RangeValidator1.MaximumValue = DateTime.Now.ToShortDateString();
RangeValidator1.MinimumValue = DateTime.MinValue.ToShortDateString();
4.Now execute and injoy thank u