私のコントローラー:
var types = _opportunityTypeService.GetAll(); //has id 1,2,3,4
viewmodel.OpportunityTypes = new SelectList(types, "Id", "Name", recipe.Id); //recipe.Id is 4
return View(viewmodel);
そして私の見解:

およびhtmlの結果:

私は何が欠けていますか?
私のコントローラー:
var types = _opportunityTypeService.GetAll(); //has id 1,2,3,4
viewmodel.OpportunityTypes = new SelectList(types, "Id", "Name", recipe.Id); //recipe.Id is 4
return View(viewmodel);
そして私の見解:

およびhtmlの結果:

私は何が欠けていますか?
Html.DropDownListForプロパティのドロップダウンリストを作成します。プロパティの場合m.OpportunityType。
したがって、選択されたアイテムはにあるものになりm.OpportunityTypeます。SelectListのSelectedプロパティは、を使用するときに使用されますHtml.DropDownList。
したがって、コードは次のようになります。
var types = _opportunityTypeService.GetAll(); //has id 1,2,3,4
viewModel.OpportunityType = 4;
viewmodel.OpportunityTypes = new SelectList(types, "Id", "Name"); //recipe.Id is 4
return View(viewmodel);