gridview 添加删除列,点击的时候取得列[id]的值
执行sql语句 ExecuteNonQuery("delete from user where id ="+id)
编辑的时候 update就可以
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
//删除
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
//编辑
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
//取消(编辑)
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
//保存(编辑)
}