one event handlers for multiple actions
Posted on 2006-06-14
I have 10 text boxes and what I would like to do is when one of them changes
to enable the save button.
Instead of having 10 diff event handlers for each text box is there a way that I can have one event handler that handles text change on all the textboxes?
this.TxFName.TextChanged +=new EventHandler(TxFName_TextChanged);
this.TxLName.TextChanged +=new EventHandler(TxLName_TextChanged);
private void TxFName_TextChanged(object sender, EventArgs e)
private void TxLName_TextChanged(object sender, EventArgs e)
I have this ten times. There has to be an easier way. Any ideas?