protected void invoiceRedistributeEqualApartment_Click(object sender, EventArgs e) { Button btn = (Button)sender; int associationExpenseId; if (int.TryParse(btn.CommandArgument, out associationExpenseId)) { AssociationExpensesManager.UpdateRedistributeMethod(associationExpenseId, 1); Response.Redirect(Request.RawUrl); } }