I have three buttons each calling btn_Clicked on their onClick event. In code behind I want to get the ID of the button that caused postback. I kno
btn_Clicked
onClick
Check whether the sender argument of your callback method is the same reference as the button your are interested in.
sender
Button button1; Button button2; void OnClick(object sender, RoutedEventArgs args) { Button button = sender as Button; if (button == button1) { ... } if (button == button2) { ... } }