Validating date in textbox in asp net martin lawrence dating history

Rated 3.86/5 based on 833 customer reviews

I'm using a comparevalidator where operator is set Data Type Check.

Work fine but when the date entered is mm/dd/yy nothing seems to happen (no events fired, no error message, page just remains the same). thx In fact, when you use Compare Validator control to validate date type.

Follow the link below: to mention it also gives the user the flexibility to type their date by hand if they wish.

However, I think your idea is better and more clear.

I'm using the format date/month/year (dd/MM/YY) Hi! You can pick up the value yourself on postback using this if you do want to set the field to read-only: if (Page. You should probably mark the first post to your original question as "Answer" too (if you haven't already) as he got you most of the way to the solution [:)] Here is an easier solution that most people are using.

You could try one of the following (in this order) : 1. Is Postback) I'm not sure if there are any problems with date formats with this approach though so take care. It will prevent postbacks and so it is easier on your server and faster for the user.

From there, the format must match the Culture Info's short date pattern and date separator.

It also handles 2 digit years and converts them to 4 digit years.

Leave a Reply