Click here to Skip to main content
15,070,111 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi i want to validate the text box whether the user entered the Date is Today or Future Date but it must not be the Past Date. how can i make code for that in Asp.Net - Source Code Page
can u help me?
Posted

u can use ajax CalendarExtender for this
   
Simple: convert the user entered date to a DateTime value and compare it in the codebehind: (assuming that is what you mean by "source Code page")

C#
if (userDate < DateTime.Now)
   {
   // It's in the past
   ...
   }
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900