I am having multiple buttons with contents 1, 2, 3, 4, 5... like this. All buttons are using same function on Click event.
You can get the content property using this in your function -
string content = (sender as Button).Content.ToString();