Those who prefer reading this site through RSS now can also subscribe for updates to .NET Tips & Tricks Community.
Normally the CompareValidator is used to check one value against another on ASP.NET page. However it also can be used to ensure user has entered data in a correct format.
Here's how it works:
Note: this method is culturally sensitive. This means that if you change your browsers settings to en-UK, a date of 1-28-01 correctly fires the validator, while 28-1-01 is allowed through. This is because the date format is day-month-year in that region.