Try to use the method from the example
here. And try to set some meaningful IDs to your buttons. You can then get them using that ID leveraging the mentioned method.
PS: You may make the method a bit more modern using some LINQ/lambda expression stuff.