J
Java Challenge
Dear all,
I'd like to handle two similar events with the same code (pressing
enter in a search textbox AND clicking on the button "search"). I could
copy the code in both events handlers but this looks like a very
unpleasant solution.
I think that in VB.NET you can do something like:
Sub mybutton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mybutton.Click, mytextbox.KeyPress,
<whaterver event I like>
How do you do that in C#?
I am really a newby so I apologize for the simple question, but
searching google didn't give me any solution.
Thanks in advance. JC
I'd like to handle two similar events with the same code (pressing
enter in a search textbox AND clicking on the button "search"). I could
copy the code in both events handlers but this looks like a very
unpleasant solution.
I think that in VB.NET you can do something like:
Sub mybutton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mybutton.Click, mytextbox.KeyPress,
<whaterver event I like>
How do you do that in C#?
I am really a newby so I apologize for the simple question, but
searching google didn't give me any solution.
Thanks in advance. JC