I am trying to make it so that when the user enters a Date of Birth and they are less then 18 years old it displays a message saying "you are too young ".
I am using the standard date format , mm/dd/yyyy/, and when the user enters their date of birth, it minuses it from todays date to determine if they can register on the site
here is my code so far
<asp:Label ID="lblDob" runat="server" Text="Date of Birth :"></asp:Label>
<asp:TextBox ID="txtDob" runat="server"></asp:TextBox>
<asp:Label ID="Label1" runat="server" Text="(mm/dd/yyyy)"></asp:Label>
<asp:RegularExpressionValidator ID="dateValRegex" runat="server"
ControlToValidate="txtDob"
ErrorMessage="*Please Enter a valid date in the format (mm/dd/yyyy)"
ValidationExpression="^(0[1-9] ...
Go to the complete details ...