V
viboater
This may be a dumb question, so bare with me.
Is it possible to detect which control triggered an event if I share an
Event Handler amoung multiple controls?
For example:
this.THIS_Btn.Click += new System.EventHandler(this.MyBtn_Click);
this.THAT_Btn.Click += new System.EventHandler(this.MyBtn_Click);
private void CancelBtn_Click(object sender, System.EventArgs e)
{
if THIS_Btn_Clicked
do_this();
else if THAT_Btn_Clicked
do_that();
}
Thanks
Is it possible to detect which control triggered an event if I share an
Event Handler amoung multiple controls?
For example:
this.THIS_Btn.Click += new System.EventHandler(this.MyBtn_Click);
this.THAT_Btn.Click += new System.EventHandler(this.MyBtn_Click);
private void CancelBtn_Click(object sender, System.EventArgs e)
{
if THIS_Btn_Clicked
do_this();
else if THAT_Btn_Clicked
do_that();
}
Thanks