string tablename = DropDownList1.SelectedValue.ToString()
string id = TextBox1.Text;
adp = new SqlDataAdapter("select * from '" + tablename + "' where id='" + id + "'", obj.connect());
DataSet ds = new DataSet();
adp.Fill(ds);
答案 0 :(得分:-1)
string.Format(" select * from {0} where id = {1}",tablename,id)