Reputation: 1399
I have a userControl(DT_Navigator)
. there is a button (btnNew
) in it.
I wrote the click button event for it:
public void btnNew_Click(object sender, EventArgs e)
{
btnNew.Enabled = false;
}
I use the user control button in another project and wrote another click event for it:
public void btnNew_Click(object sender, EventArgs e)
{
btnNew.Enabled = false;
}
but, when I press the Enter key, just the first event that I defined in user control, executes. However I want both events to execute.
when I click on btnNew
, both events trigger, but when I press Enter key, only one event triggers.
how can I fix the problem? Thanks...
Upvotes: 0
Views: 738