/Mvc3Application/Views/Account/LogOn.cshtml

https://bitbucket.org/davidebbo/mvc3application · Razor · 48 lines · 39 code · 9 blank · 0 comment · 1 complexity · af56970dd7d58707d7668f3173dced15 MD5 · raw file

  1. @model Mvc3Application.Models.LogOnModel
  2. @{
  3. ViewBag.Title = "Log On";
  4. }
  5. <h2>Log On</h2>
  6. <p>
  7. Please enter your user name and password. @Html.ActionLink("Register", "Register") if you don't have an account.
  8. </p>
  9. <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
  10. <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
  11. @Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")
  12. @using (Html.BeginForm()) {
  13. <div>
  14. <fieldset>
  15. <legend>Account Information</legend>
  16. <div class="editor-label">
  17. @Html.LabelFor(m => m.UserName)
  18. </div>
  19. <div class="editor-field">
  20. @Html.TextBoxFor(m => m.UserName)
  21. @Html.ValidationMessageFor(m => m.UserName)
  22. </div>
  23. <div class="editor-label">
  24. @Html.LabelFor(m => m.Password)
  25. </div>
  26. <div class="editor-field">
  27. @Html.PasswordFor(m => m.Password)
  28. @Html.ValidationMessageFor(m => m.Password)
  29. </div>
  30. <div class="editor-label">
  31. @Html.CheckBoxFor(m => m.RememberMe)
  32. @Html.LabelFor(m => m.RememberMe)
  33. </div>
  34. <p>
  35. <input type="submit" value="Log On" />
  36. </p>
  37. </fieldset>
  38. </div>
  39. }