one is start date another is end date i want end date aways greater than start date how i validate plz help me
ErrorMessage="end date should be greated than startdate"
ControlToCompare="start_sdate" runat="server">
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.
Sunny SharmaPosted Jun 4, 2013, 8:33 AM
validators use the current CultureInfo object to determine the date format.
As a simple workaround, change the Date Format of Extender to (dd/mm/yyyy).
Thanks.
Bhabani prasad DashPosted Jun 4, 2013, 7:41 AM
Sunny SharmaPosted Jun 4, 2013, 7:38 AM
-----------------------------------------
-----------------------------------------
Hope it helps :)
Thanks.
Bhabani prasad DashPosted Jun 4, 2013, 6:33 AM
Sunny SharmaPosted Jun 4, 2013, 6:27 AM
The code I've suggested you is tested and working absolutely fine
Please share codes in your .aspx page so that I can get a better picture.
Thanks.
Bhabani prasad DashPosted Jun 4, 2013, 6:20 AM
Sunny SharmaPosted Jun 4, 2013, 6:10 AM
Only a minor modification required if you want the End date to be always greater than the Start date:
------------------------------------------------------
ErrorMessage="end date should be greated than startdate"
ControlToCompare="start_sdate" runat="server">
------------------------------------------------------
Change the Operator property to "GreaterThan" from "GreaterThanEqual". GreaterThanEqual will check for a date greater than or equal to the date present in txtStartDate.
Hope you got the idea!
Happy Coding:)
Please mark this as answer if it helps!
Thanks.