select * from 表 where 字段='"+条件+"';
string SqlConn=System.Configuration.ConfigurationSettings.AppSettings["ConnString"];
SqlConnection Conn=new SqlConnection(SqlConn);
Conn.Open();
string mysql="select * from db_hetongguanli_y_g";
SqlCommand cm=new SqlCommand (mysql,Conn);
SqlDataReader dr=cm.ExecuteReader ();
while(dr.Read ())
{
if(!this.IsPostBack)
{
this.DropDownList2.Items.Add(new ListItem(dr["hetongid"].ToString()));
}
}
Conn.Close ();
dr.Close();