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
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Deepak Kumar ChoudharyPosted Oct 1, 2014, 7:05 AM
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