/TEMP/Views/Account/Register.cshtml

# · Razor · 61 lines · 52 code · 9 blank · 0 comment · 0 complexity · ee38ed39aa3ef7d6dfc375bf1367cc61 MD5 · raw file

  1. @model TEMP.Models.RegisterModel
  2. @{
  3. ViewBag.Title = "Register";
  4. }
  5. <h2>Create a New Account</h2>
  6. <p>
  7. Use the form below to create a new account.
  8. </p>
  9. <p>
  10. Passwords are required to be a minimum of @ViewBag.PasswordLength characters in length.
  11. </p>
  12. <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
  13. <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
  14. @using (Html.BeginForm()) {
  15. @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
  16. <div>
  17. <fieldset>
  18. <legend>Account Information</legend>
  19. <div class="editor-label">
  20. @Html.LabelFor(m => m.UserName)
  21. </div>
  22. <div class="editor-field">
  23. @Html.TextBoxFor(m => m.UserName)
  24. @Html.ValidationMessageFor(m => m.UserName)
  25. </div>
  26. <div class="editor-label">
  27. @Html.LabelFor(m => m.Email)
  28. </div>
  29. <div class="editor-field">
  30. @Html.TextBoxFor(m => m.Email)
  31. @Html.ValidationMessageFor(m => m.Email)
  32. </div>
  33. <div class="editor-label">
  34. @Html.LabelFor(m => m.Password)
  35. </div>
  36. <div class="editor-field">
  37. @Html.PasswordFor(m => m.Password)
  38. @Html.ValidationMessageFor(m => m.Password)
  39. </div>
  40. <div class="editor-label">
  41. @Html.LabelFor(m => m.ConfirmPassword)
  42. </div>
  43. <div class="editor-field">
  44. @Html.PasswordFor(m => m.ConfirmPassword)
  45. @Html.ValidationMessageFor(m => m.ConfirmPassword)
  46. </div>
  47. <p>
  48. <input type="submit" value="Register" />
  49. </p>
  50. </fieldset>
  51. </div>
  52. }