Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. public ActionResult Create()
  2. {
  3. ViewBag.Types = new SelectList(db.Types.ToList(), "Id", "Name");
  4.  
  5. return View();
  6. }
  7.  
  8.  
  9. @Html.DropDownListFor(model => model.Type, (SelectList)ViewBag.Types, new { @class = "form-control"})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement