我写了一个,但是运行没反应,大家帮忙看看在gridview里一列删除按钮,commandname=Delete;代码: protected void GridView1_RowDeleting1(object sender, GridViewDeleteEventArgs e)
{
string id = GridView1.DataKeys[e.RowIndex].Values[0].ToString();
string connStr = System.Configuration.ConfigurationManager.AppSettings["strConn"].ToString();
string SqlStr = "delete from news where id=" + id;
SqlConnection con = new SqlConnection(connStr);
con.Open();
DataSet myDataSet = new DataSet();
string sql = "select* from news where shifouchakan = 0";
SqlDataAdapter myCommand = new SqlDataAdapter(sql, con);