lundi, avril 10, 2006

Date textbox asp.net validation

if you want to validate a textbox that contain a DateTime format string, just use a CompareValidator, indicate the textbox to validate and use DataTypeCheck as operator

ErrorMessage="Format date invalid" Operator="DataTypeCheck" Type="Date">

Note that is a server side validation of course :)

Aucun commentaire: