protected void delete(object sender, GridViewDeleteEventArgs e) { CPT_AccountMaster accountdetails = new CPT_AccountMaster(); int id = int.Parse(gvAccount.DataKeys[e.RowIndex].Value.ToString()); accountdetails.AccountMasterID = id; AccountMasterBL deleteAccount = new AccountMasterBL(); deleteAccount.Delete(accountdetails); BindGrid(); }