Wednesday, 5 December 2012

[solved]validate date format in asp.net

Use this its working fine


<asp:TextBox ID="txt" runat="server" ></asp:TextBox>

 <asp:CompareValidator ID="dateValidator" runat="server" Type="Date" Operator="DataTypeCheck"  ControlToValidate="txt" ErrorMessage="Invalid date.">
 </asp:CompareValidator>

No comments:

Post a Comment