Advertisement
Guest User

Code

a guest
Jan 31st, 2018
39
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @model InventoryApp.Models.Request
  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>Request</h4>
  16.         <hr />
  17.         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  18.         <div class="form-group">
  19.             @Html.LabelFor(model => model.RequestDate, htmlAttributes: new { @class = "control-label col-md-2" })
  20.             <div class="col-md-10">
  21.                 @Html.EditorFor(?model => model.RequestDate, new { htmlAttributes = new { @class = "form-control" } })
  22.                 @Html.ValidationMessageFor(model => model.RequestDate, "", new { @class = "text-danger" })
  23.             </div>
  24.         </div>
  25.  
  26.         <div class="form-group">
  27.             <div class="col-md-offset-2 col-md-10">
  28.                 <input type="submit" value="Create" class="btn btn-default" />
  29.             </div>
  30.         </div>
  31.     </div>
  32. }
  33.  
  34. <div>
  35.     @Html.ActionLink("Back to List", "Index")
  36. </div>
  37.  
  38. @section Scripts {
  39.     @Scripts.Render("~/bundles/jqueryval")
  40. }
Advertisement
RAW Paste Data Copied
Advertisement