Advertisement
rozman50

Untitled

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