gladyssann

View(User.chtml)

Jan 3rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. @model OverTime.Models.UserModel
  2.  
  3. @{
  4. ViewBag.Title = "CreateUser";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. }
  7.  
  8. <h2>CreateUser</h2>
  9.  
  10. @using (Html.BeginForm())
  11. {
  12. @Html.AntiForgeryToken()
  13.  
  14. <div class="form-horizontal">
  15. <h4>UserModel</h4>
  16. <hr />
  17. @Html.ValidationSummary(true)
  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.EditorFor(model => model.username)
  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.EditorFor(model => model.email)
  31. @Html.ValidationMessageFor(model => model.email)
  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.EditorFor(model => model.password)
  39. @Html.ValidationMessageFor(model => model.password)
  40. </div>
  41. </div>
  42.  
  43. <div class="form-group">
  44. <div class="col-md-offset-2 col-md-10">
  45. <input type="submit" value="Create" class="btn btn-default" />
  46. </div>
  47. </div>
  48. </div>
  49. }
  50.  
  51. <div>
  52. @Html.ActionLink("Back to List", "Index")
  53. </div>
Advertisement
Add Comment
Please, Sign In to add comment