How to raise an event of button (click event) from textbox's onkeydown event?

  • Thread starter Thread starter ABC
  • Start date Start date
A

ABC

How to raise an event of button (click event) from textbox's onkeydown
event?

I have a button which have or not a click event and a textbox which have
onkeydown event.
I want add some feature on textbox such process input '*' character will
raise click event of a button.

which function or statement in c# will raise an event of button from
textbox?
 
Why do you want to raise the Click event of a button? If you want the
KeyDown event handler for a TextBox to execute the same code as the Click
event handler for a button, put the code into a method, and call the same
method from both event handlers.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Sequence, Selection, Iteration.
 
ABC said:
How to raise an event of button (click event) from textbox's onkeydown
event?

I have a button which have or not a click event and a textbox which have
onkeydown event.
I want add some feature on textbox such process input '*' character will
raise click event of a button.

Call the button's 'PerformClick' method.
 
Back
Top