@{ ViewData["Title"] = "Привязка статьи затрат к сделке"; var costs = new SelectList(ViewBag.Costs, "Id", "NameOfCost"); costs.Where(x => Convert.ToInt32(x.Value) == ViewBag.SelectedId).ToList().ForEach(x => x.Selected = true); }