protected void gvBankAccountInfo_RowCommand(object sender, GridViewCommandEventArgs e) { //BankAccounts.deleteBankAccountInfo(Convert.ToInt32(e.CommandArgument)); //BankAcountInfo(); if (e.CommandName == "Delete") { BankAccounts.DeleteBankAccountInfo(Convert.ToInt32(e.CommandArgument)); BankAcountInfo(); } if (e.CommandName == "Edit") { Response.Redirect("/BankAccount/AddBankAccount.aspx?BankAccountId=" + Convert.ToInt32(e.CommandArgument)); //int index = Convert.ToInt32(e.CommandArgument); //GridViewRow row = gvBankAccountInfo.Rows[index]; //ImageButton imgedit = (ImageButton)row.FindControl("imgbtnEditSetting"); //imgedit.PostBackUrl = "/editBankAccount.aspx?BankAccountId=" + Convert.ToInt32(e.CommandArgument); } if (e.CommandName == "Active") { BankAccounts.ActivateBankAccountInfo(Convert.ToInt32(e.CommandArgument)); BankAcountInfo(); } }