2
Reply

Events and sender object

Bevan Shervey

Bevan Shervey

Jun 14 2007 4:36 PM
1.8k
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)