I use the following code to get a valid date input.
validatorExpression = new RegularExpressionValidator();
validatorExpression.ControlToValidate = this.ID;
ValidatorExpression.ErrorMessage = "Valid Input mm/dd/yyyy";
validatorExpression.ValidationExpression = @"^\d{1,2}/\d{1,2}/\d{4}$";
validatorExpression.EnableClientScript = true;
The expression works fine, the problem I have is that when the field is
empty, it is asking the user for a date but one is not required.
How do I allow an empty value?
Thanks!
Ben
Jon Paal - 30 Sep 2006 16:46 GMT
if (this.ID != ''){ ... }
>I use the following code to get a valid date input.
>
[quoted text clipped - 12 lines]
>
> Ben