Using C#
C# Code
protected void cusCustom_ServerValidate(object sender, ServerValidateEventArgs e)
{
if(e.Value.Length == 8)
e.IsValid = true;
else
e.IsValid = false;
}
Page code
<asp:CustomValidator runat="server" id="cusCustom" controltovalidate="txtoedate" onservervalidate="cusCustom_ServerValidate" errormessage="The text must be exactly 8 characters long!" />
The above code is working for the length, but i want to check the date format like this "yyyy-mm-dd", for checking this date format, how to change my code.
Need Code Help