title: validate date of birth in MVC asp.net
body: <p>i'm having difficulties to validate date of birth. the user should select a date from the calendar. once the user click on validate. it should be able to determine if it is over 18 or under 18.  im new in mvc. any help? what statement should i insert to validate the dob (under or over 18)
  here what i have tried:
  Controller:</p>
  
  <pre><code>public ActionResult Create(Information information, string buttonType)
      {
          if (buttonType=="Register")
          {
              var byteArray = Encoding.ASCII.GetBytes(information.Surname + Environment.NewLine + information.DOBP + Environment.NewLine + information.Email + Environment.NewLine + information.Gender + Environment.NewLine + information.Tel);
              var stream = new MemoryStream(byteArray);
              return File(stream, "text/plain", "Registration.txt");
          }
          if (buttonType=="Validate")
          {
  
  
          }
          return View(information);
  
  
  
      }
  </code></pre>