关于Html.DropDownList :There is no ViewData item with the key 'ddlist' of type 'IEnumerable<SelectListItem>' 的问题
2010-10-2510:35:22
刚接触MVC不久,在使用=Html.DropDownList测试数据时出现了一个小问题
这在预览时是没问题的,但当提交数据时会出现 There is no ViewData item with the key 'ddlist' of type 'IEnumerable<SelectListItem>' 的问题。迷茫了……,错到哪里呢?
最后明白了,原来方法重写是忘记在以前的方法加上 ↓
下面贴上完整的代码