当我改变时"model => model.id","model => model.Supplierid"我正在低于错误
"当允许多个选择时,参数'expression'必须求值为IEnumerable."
请看下面的代码
//这是我的模特课
public class clslistbox{
public int id { get; set; }
public int Supplierid { get; set; }
public List<SuppDocuments> lstDocImgs { get; set; }
public class SuppDocuments
{
public string Title { get; set; }
public int documentid { get; set; }
}
public List<SuppDocuments> listDocImages()
{
List<SuppDocuments> _lst = new List<SuppDocuments>();
SuppDocuments _supp = new SuppDocuments();
_supp.Title = "title";
_supp.documentid = 1;
_lst.Add(_supp);
return _lst;
}
} …Run Code Online (Sandbox Code Playgroud) 我的页面中有一个列表框..
<td><%=Html.ListBox("listServiceTypes", Model.ServiceTypeListAll, new { style = "width: 500px;height:200px;" })%>
Run Code Online (Sandbox Code Playgroud)
我需要禁用从列表框中选择多个项目?我正在做一些事情,比如选择一个项目并单击删除按钮我的页面从列表框中删除一个项目..但如果我选择多项目,它会抛出错误消息/.?
任何正文都可以帮助我解决如何从列表框中取消激活或禁用多个项目