gladyssann

CreateUser.cshtml(View)

Jan 16th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. @model OverTime.Models.UserModel
  2.  
  3. @{
  4. ViewBag.Title = "Register";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. }
  7.  
  8. <h2>@ViewBag.Title</h2>
  9.  
  10. @using (Html.BeginForm("CreateUser", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
  11. {
  12. @Html.AntiForgeryToken()
  13.  
  14. <div class="form-horizontal">
  15. <h4>Create a new account.</h4>
  16. <hr />
  17. @*@Html.ValidationSummary(false, "", new { @class = "text-danger" })*@
  18.  
  19. <div class="form-group">
  20. @Html.LabelFor(model => model.username, new { @class = "control-label col-md-2" })
  21. <div class="col-md-10">
  22. @Html.TextBoxFor(model => model.username, new { @class = "form-control" })
  23. @Html.ValidationMessageFor(model => model.username)
  24. </div>
  25. </div>
  26.  
  27. <div class="form-group">
  28. @Html.LabelFor(model => model.email, new { @class = "control-label col-md-2" })
  29. <div class="col-md-10">
  30. @Html.TextBoxFor(model => model.email, new { @class = "form-control" })
  31. @Html.ValidationMessageFor(model => model.email, "", new { @class = "error" })
  32. </div>
  33. </div>
  34.  
  35. <div class="form-group">
  36. @Html.LabelFor(model => model.password, new { @class = "control-label col-md-2" })
  37. <div class="col-md-10">
  38. @Html.PasswordFor(model => model.password, new { @class = "form-control" })
  39. @Html.ValidationMessageFor(model => model.password)
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. @Html.LabelFor(m => m.confirmPassword, new { @class = "col-md-2 control-label" })
  44. <div class="col-md-10">
  45. @Html.PasswordFor(m => m.confirmPassword, new { @class = "form-control" })
  46. @Html.ValidationMessageFor(model => model.confirmPassword)
  47. </div>
  48. </div>
  49.  
  50. <div class="form-group">
  51. <div class="col-md-offset-2 col-md-10">
  52. <input type="submit" value="Register" class="btn btn-default" />
  53. </div>
  54. </div>
  55. </div>
  56. }
  57.  
  58. @section Scripts {
  59. @Scripts.Render("~/bundles/jqueryval")
  60. }
Advertisement
Add Comment
Please, Sign In to add comment