DropDownList下拉框显示数据问题!!!
string connString = "server=(local);uid=sa;pwd=;database=Northwind"; string cmdText = "select * from ZI ";
SqlConnection conn = new SqlConnection(connString);
SqlDataAdapter adp = new SqlDataAdapter(cmdText,conn);
DataSet ds = new DataSet();
adp.Fill(ds);
DropDownList1.DataSource = ds;
DropDownList1.DataTextField = "Address_name";
DropDownList1.DataValueField = "Relegation_ID";
DropDownList1.DataBind();
我想要显示Address_name的字段,不过要符合Relegating_ID为空的条件,应该怎么判断
请高手帮忙下!!!