我有两张桌子
EmpInf
EmpId,
EmpName,
Salary,
DepartNumber.
Dept
DeptNo,
Deptname,
我也有一个listview1
和dropdownlist1
哪个是必然的EmpInf.EmpName
在传递特定查询时
FilterControl.DataClasses1DataContext obj = new DataClasses1DataContext();
protected void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
{
var a = from r in obj.EmpInfs join s in obj.Dept1s on r.DeptNumber equals s.DeptNo where r.EmpName == "'" + DropDownList1.SelectedValue + "'" select s;
ListView1.DataSource = a;
ListView1.DataBind();
}
每当我从下拉列表中选择特定名称时,它都会返回No data were returned。我遗漏了哪些特定代码或是否有任何其他错误?