can not vaildate date in asp.net

mush 181 Reputation points
2022-03-23T03:45:47.657+00:00

185820-capture1.pngI'm trying to validate date where if the date in the database is equal or greater than the current date it shows some message otherwise it shows another message.
I tried this but it always skips the first message even though there is entry in the database where the date is greater than the current date:

(for some reason the system here wouldn't allow me to post my code so I put this screenshot instead. )

Developer technologies | ASP.NET | Other
{count} votes

Answer accepted by question author
  1. Bruce (SqlWork.com) 81,976 Reputation points Volunteer Moderator
    2022-03-23T15:28:59.177+00:00

    also your sql code allows sql injection. you should change to parameters.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.