2
Answers

TextChange Event

Chris

Chris

17y
4.9k
1

First of all I just picked up C# a few days ago, so I am green as grass.  The problem I am having is with the TextChange event.  I am trying to get the name of the text box that this event came from.  Here is a sample of my code.

myTextBox.TextChanged += new EventHandler(textBoxChanged);

private void textBoxChanged(object sender, EventArgs e)

{

//This is where I need to know what textbox fired the event.

}

How do I send the name to this?  Any thoughts?  I might not even be approaching this properly.  I also checked out some custom event handlers, but being new, it's a nightmare.

 

Thanks in advance,

Chris

Answers (2)