DropDownList绑定值的问题
ILineClass ilcsll = (ContainerWebAccessorUtil.ObtainContainer())["LineClassService"] as ILineClass;
Model.LineClass lclsd = ilcsll.Find1(Convert.ToInt32(weiboNick.Text));
DropDownList1.DataSource = lclsd;
DropDownList1.DataTextField = "name";
DropDownList1.DataValueField = "id";
DropDownList1.DataBind();
怎么是数据源的类型无效。它必须是 IListSource、IEnumerable 或 IDataSource错误
------解决方案--------------------
lclsd 把它转换成数组或者数据集合再赋值把