//In my controller I create a list of all items in db.Tags, with value is Id, text is Name and selected value is tagstologos.TagId. ViewBag.TagId = new SelectList(db.Tags, "Id", "Name", tagstologos.TagId); //In my view I create the dropdownlist with a HTML helper. @Html.DropDownList("TagId", String.Empty)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)