Gridview1_RowUpdating的重组均与委托System.Web.UI.WebControls.GridViewUpdatingEventHandl
protected void GridView1_RowUpdating(object sender, GridViewUpdatedEventArgs e)
{
string sqlstr3 = "update news set n_id='"
+ ((TextBox)(GridView1.Rows[e.RowIndex].Cells[1].Controls[0])).Text.ToString().Trim() + "',n_category='"
+ ((TextBox)(GridView1.Rows[e.RowIndex].Cells[2].Controls[0])).Text.ToString().Trim() + "',n_title='"
+ ((TextBox)(GridView1.Rows[e.RowIndex].Cells[3].Controls[0])).Text.ToString().Trim() + "',n_content='"
+ ((TextBox)(GridView1.Rows[e.RowIndex].Cells[3].Controls[0])).Text.ToString().Trim() + "', where id='" + GridView1.DataKeys[e.RowIndex].Value.ToString() + "'";
SqlCommand sqlcom1 = new SqlCommand(sqlstr3,myconn);
myconn.Open();
sqlcom1.ExecuteNonQuery();
myconn.Close();
GridView1.EditIndex = -1;
bind();
}
除了错误:Gridview1_RowUpdating的重组均与委托System.Web.UI.WebControls.GridViewUpdatingEventHandlar不匹配
还有:System.Web.UI.WebControls.GridViewUpdatingEventArgs并不包含RowIndwx的定义