I have a .aspx page in which there are form fields to search by and upon search button click, a datagrid with results is displayed below.
I have a date validation control:
<asp:comparevalidator id="Comparevalidator" Text="Date must be in mm/dd/yyyy form!" Runat="server" Type="Date" Operator="DataTypeCheck" Display="Dynamic" ControlToValidate="txtMyDate" ErrorMessage="Date in wrong format" ></asp:comparevalidator>
[/blue]
But this control allows dates in the following format: mm/dd/yyyy and m/d/yyyy, but I would like to create a custom validation control that only accepts mm/dd/yyyy dates. I have been having trouble implementing this.
Thank you in advance for your assistance.
I have a date validation control:
<asp:comparevalidator id="Comparevalidator" Text="Date must be in mm/dd/yyyy form!" Runat="server" Type="Date" Operator="DataTypeCheck" Display="Dynamic" ControlToValidate="txtMyDate" ErrorMessage="Date in wrong format" ></asp:comparevalidator>
[/blue]
But this control allows dates in the following format: mm/dd/yyyy and m/d/yyyy, but I would like to create a custom validation control that only accepts mm/dd/yyyy dates. I have been having trouble implementing this.
Thank you in advance for your assistance.