DropDownListFor使用注意

 注意ViewBag.属性名  不能与 m.属性名 相同,否则在编辑的时候会获取不到字段值

1 @Html.DropDownListFor(m => m.EnterpriseType, ViewBag.EnterpriseType1 as IEnumerable<SelectListItem>, "请选择") 

posted @ 2015-01-14 16:55  JJ.Net  阅读(268)  评论(0)    收藏  举报