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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bhabani prasad Dash168 reputationPosted Jun 4, 2013, 2:20 AM EDT
Sunny SharmaRank #223 · 11.1K reputationPosted Jun 4, 2013, 2:27 AM EDT
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 Dash168 reputationPosted Jun 4, 2013, 2:33 AM EDT
Sunny SharmaRank #223 · 11.1K reputationPosted Jun 4, 2013, 3:38 AM EDT
-----------------------------------------
-----------------------------------------
Hope it helps :)
Thanks.
Bhabani prasad Dash168 reputationPosted Jun 4, 2013, 3:41 AM EDT
Sunny SharmaRank #223 · 11.1K reputationPosted Jun 4, 2013, 4:33 AM EDT
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.
Sunny SharmaRank #223 · 11.1K reputationPosted Jun 4, 2013, 2:10 AM EDT
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.