protected void Button_Click(object sender, EventArgs e) { Button btn = sender as Button; if (btn.ID == "Button1") { // es el button1 } else { // es el button2 } }