前台:……//使用commandfield//或者使用linkbutton,且可以调用Javascript提示用记是否删除当前行,后台都调用一样的方法rowdeleting删除 ……后台:……protected void GVMyWish_RowDeleting(object sender, GridViewDeleteEventArgs e){int parWishId =Convert.ToInt32( GVMyWish.DataKeys[e.RowIndex][0]);con = new SqlConnection(connectStr);con.Open();com = new SqlCommand("proc_delWish",con);com.CommandType = CommandType.StoredProcedure;com.Parameters.Add(new SqlParameter("@wishId",parWishId));com.ExecuteNonQuery();con.Close();GVMyWish.EditIndex = -1;ShowWish();}protected void GVMyWish_SelectedIndexChanged(object sender, EventArgs e){GVMyWish.EditIndex = -1;ShowWish();}……