更新时间:2022-01-05 04:53:49
其中 ITInfoID = + DropDownList1.SelectedValue +"
where ITInfoID =" + DropDownList1.SelectedValue + "", conn); ds = new DataSet(); da.Fill(ds); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); }
您需要另一个双引号字符:
You need another double quote character:
da = new SqlDataAdapter(select * from ITInfo
" span> + DropDownList1.SelectedValue +" ,conn) ;
where ITInfoID =" + DropDownList1.SelectedValue + "", conn);
成为
da = new SqlDataAdapter("select * from ITInfo