protected void ClientesGridView_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Eliminar") { try { int clienteId = Convert.ToInt32(e.CommandArgument); ClienteBLL.EliminarCliente(clienteId); CargarLista(); } catch (Exception ex) { } } if (e.CommandName == "Editar") { Response.Redirect("~/FormularioCliente.aspx?id=" + e.CommandArgument.ToString()); } }