2
Answers

Events and sender object

Bevan Shervey

Bevan Shervey

17y
1.8k
1
I have a datagrid and 2 textboxes that all trigger the same Leave event.  Now I would like to know which tool got me into the event.  When I check the value of *sender*, it is System.Windows.Forms.Textbox, and the .Text value of the textbox if there is one. 

Is there a way to get the exact senders name, like TextBox1, or dataGrid1?
Answers (2)