Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. @model ContosoUniversity.Models.Student
  2.  
  3. @{
  4. ViewBag.Title = "Create";
  5. }
  6.  
  7. <h2>Create</h2>
  8.  
  9.  
  10. @using (Html.BeginForm())
  11. {
  12. @Html.AntiForgeryToken()
  13.  
  14. <div class="form-horizontal">
  15. <h4>Student</h4>
  16. <hr />
  17. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  18. <div class="form-group">
  19. @Html.LabelFor(model => model.LastName, htmlAttributes: new { @class = "control-label col-md-2" })
  20. <div class="col-md-10">
  21. @Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } })
  22. @Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" })
  23. </div>
  24. </div>
  25.  
  26. <div class="form-group">
  27. @Html.LabelFor(model => model.FirstMidName, htmlAttributes: new { @class = "control-label col-md-2" })
  28. <div class="col-md-10">
  29. @Html.EditorFor(model => model.FirstMidName, new { htmlAttributes = new { @class = "form-control" } })
  30. @Html.ValidationMessageFor(model => model.FirstMidName, "", new { @class = "text-danger" })
  31. </div>
  32. </div>
  33.  
  34. <div class="form-group">
  35. @Html.LabelFor(model => model.EnrollmentDate, htmlAttributes: new { @class = "control-label col-md-2" })
  36. <div class="col-md-10">
  37. @Html.EditorFor(model => model.EnrollmentDate, new { htmlAttributes = new { @class = "form-control" } })
  38. @Html.ValidationMessageFor(model => model.EnrollmentDate, "", new { @class = "text-danger" })
  39. </div>
  40. </div>
  41.  
  42. <div class="form-group">
  43. <div class="col-md-offset-2 col-md-10">
  44. <input type="submit" value="Create" class="btn btn-default" />
  45. </div>
  46. </div>
  47. </div>
  48. }
  49.  
  50. <div>
  51. @Html.ActionLink("Back to List", "Index")
  52. </div>
  53.  
  54. @section Scripts {
  55. @Scripts.Render("~/bundles/jqueryval")
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement