I stole the following from here.
@model IEnumerable<Sample.Models.Product> @{ List<Sample.Models.Category> list = ViewBag.Categories; var items = new SelectList(list, "CategoryID", "CategoryName"); } @Html.DropDownListFor(???, @items)
No comments:
Post a Comment