和一样,我对ASP.NET MVC Html.ListBoxFor(...)也有些困惑。具体地说,我把选择结果放在一个列表中,但在我发布结果之后,我得到了
InvalidOperationException: The ViewData item that has the key 'SelectedDeclarations' is of type 'System.String[]' but must be of type 'IEnumerable<SelectListItem>
我正在处理一个Razor MVC3项目public class ProductFormatModel public int ID {get; set;}
A textfield插入SerialID (Done)下拉列表以选择枚举器ProductType (done)A列表框的值,其中包含不同的行,显示ProductComponent每一行都