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

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?
 
K

Kevin Spencer

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.
 
H

Herfried K. Wagner [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top