我有一个网格视图的数据显示一个问题,当我按下按钮“agregar”:数据显示网格视图
它显示了一个小广场,并显示任何数据。
cn.Open();
MySqlCommand cm = cn.CreateCommand();
cm.CommandType = CommandType.Text;
cm.CommandText = "select * from detalle where iddetalle= '" + txt_boleta.Text + "'and idlocal='" + txtlocal.Text + "'";
cm.ExecuteNonQuery();
MySqlDataAdapter da = new MySqlDataAdapter(cm);
DataSet ds = new DataSet();
da.Fill(ds,"data");
GridView1.DataSource = ds.Tables["data"];
GridView1.DataBind();
因为你在没有执行好,如果执行的查询将欢迎黑客通过注入 –