如下代码用于把班号绑定到下拉列表控件中,请把程序填写完整: private void Bindclass() { string sql = "SELECT banhao, banming FROM t_class"; SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["testdataConnectionString"].ConnectionString); SqlDataAdapter adapter = new SqlDataAdapter(sql, conn); DataSet ds = new DataSet(); conn.Open(); adapter.Fill(ds); conn.Close(); ddl_cla.DataSource = ds.Tables[0]; ddl_cla.DataValueField = ( ) ; ddl_cla.DataTextField = ( ) ; ddl_cla.DataBind(); }
A.
ddl_cla.DataValueField = banhao ; ddl_cla.DataTextField = banming ;
B.
ddl_cla.DataValueField = "banhao" ; ddl_cla.DataTextField = "banming" ;
C.
ddl_cla.DataValueField =banming ; ddl_cla.DataTextField = banhao ;
D.
ddl_cla.DataValueField ="banming" ; ddl_cla.DataTextField = "banhao" ;