将DropDownList的value作为数据源的查询条件的值

解决方案 »

  1.   

    /*System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection("server=localhost;database=northWind;uid=sa;password=1");
    conn.Open();
    System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter("select * from customers",conn);
     dt = new System.Data.DataSet();
    da.Fill(dt,"customers");*/
    然后绑定!查询条件在commandtext立面加!