我想在DropDownList
中查看此查询,但结果将显示如下
{family=jac}
var show = (from u in database.tbl_Customer
where u.moaref == session
select new { u.Family }).ToList();
DropDownList1.DataSource = show;
DropDownList1.DataBind();
答案 0 :(得分:0)
投影Family
而不是匿名对象:
var show = (from u in database.tbl_Customer
where u.moaref == session
select u.Family).ToList();