我有一个问题,即所选值不适用于Html.DropDownList帮助器方法。见下文:这是我的Controller:publicActionResultEdit(intid=0){NewsEventitem=GetItem(id);ViewBag.NewsItemId=newSelectList(ViewBag.NewsItemId.Items,"Id","Name",item.NewsItemId);returnView(item);}这是我的观点:@Html.DropDownList("NewsItemId",ViewBag.NewsItemIdasSelectList,string
我有一个问题,即所选值不适用于Html.DropDownList帮助器方法。见下文:这是我的Controller:publicActionResultEdit(intid=0){NewsEventitem=GetItem(id);ViewBag.NewsItemId=newSelectList(ViewBag.NewsItemId.Items,"Id","Name",item.NewsItemId);returnView(item);}这是我的观点:@Html.DropDownList("NewsItemId",ViewBag.NewsItemIdasSelectList,string