protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Delete") { string account_id = e.CommandArgument.ToString(); AccountAdapter aa = new AccountAdapter(); try { aa.delete(account_id); GridView1.SelectedIndex = -1; show(); clean(); Label1.Text = "删除成功"; } catch (Exception ex) { Label1.Text = ex.Message; } } }