protected async void btnExcluir_Click(object sender, EventArgs e) { try { var id = ((Button)sender).CommandArgument; HttpResponseMessage response = await CallApi.DeleteInfo(ApiEndPoint.ApiCliente + ApiEndPoint.Deletar + id); MessageBox.Show(this.Page, response.ReasonPhrase); if (response.StatusCode == HttpStatusCode.OK) { CarregaRepeater(); } } catch (Exception ex) { MessageBox.Show(this.Page, "Erro ao excluir cliente: " + ex.Message); } }