ViewBag名称是否与DropDownList中的Model属性名称相同?
SelectList:
ViewBag.CustomerID = new SelectList(db.CustomerSyncs, "CustomerID", "Name");
DropDownListForView:
@Html.DropDownListFor(model => model.CustomerID, (SelectList)ViewBag.CustomerID, "please select")
ViewBagModelCustomerID
慕尼黑的夜晚无繁华
繁华开满天机
至尊宝的传说
随时随地看视频慕课网APP