各位求救 button1为什么不执行我给它写的代码?代码没错吧?
protected void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("server = (local); database = pipeline integrity; uid = sa; pwd = 123456");
con.Open();
string neirong = TextBox2.Text;
SqlDataAdapter ds = new SqlDataAdapter("select * from guandao where " + neirong + " = '" + TextBox1.Text + "'", con);
DataSet dt = new DataSet();
ds.Fill(dt);
GridView1.DataSource = dt.Tables[0];
GridView1.DataBind();
con.Close();
}
protected void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("server = (local); database = pipeline integrity; uid = sa; pwd = 123456");
con.Open();
string neirong = TextBox2.Text;
SqlDataAdapter ds = new SqlDataAdapter("select * from guandao where " + neirong + " = '" + TextBox1.Text + "'", con);
DataSet dt = new DataSet();
ds.Fill(dt);
GridView1.DataSource = dt.Tables[0];
GridView1.DataBind();
con.Close();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货