Advertisement
Guest User

New View

a guest
Jul 13th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 0.84 KB | None | 0 0
  1. @model City
  2. @{
  3.     ViewData["Title"] = "New";
  4. }
  5.  
  6. <h2>New</h2>
  7.  
  8. <form asp-controller="city" asp-action="new" method="post">
  9.  
  10.     <div>
  11.         <label asp-for="Name"></label>
  12.         <input asp-for="Name" />
  13.         <span asp-validation-for="Name"></span>
  14.     </div>
  15.  
  16.     <div>
  17.         <label asp-for="CountryCode"></label>
  18.         <select asp-for="CountryCode" asp-items="@ViewBag.CountryCodes"></select>
  19.         <span asp-validation-for="CountryCode"></span>
  20.     </div>
  21.  
  22.     <div>
  23.         <label asp-for="District"></label>
  24.         <input asp-for="District" />
  25.         <span asp-validation-for="District"></span>
  26.     </div>
  27.  
  28.     <div>
  29.         <label asp-for="Population"></label>
  30.         <input asp-for="Population" />
  31.         <span asp-validation-for="Population"></span>
  32.     </div>
  33.  
  34.  
  35.     <button>Submit</button>
  36. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement