How will U encapsulate button trigger event into text_box
event of Pressing Enter key?i.e only after pressing Enter
after the text is typed the button trigger event should
activate?
Answer Posted / varun sharma
This should possibly do the trick for purpose
protected void Button1_KeyDown(object sender, EventArgs e)
{
if(e.KeyCode == Keys.Enter)
{
Button_Click(null, null);
}
}
protected void Button_Click(object sender, EventArgs e)
{
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is string pool in c#?
What is a class in unity?
What is typeof c#?
How do I trim a space in c#?
Why is main static in c#?
What is the diff between System.String and System.Text.StringBuilder classes?
What is a hashset c#?
What is Implementation inheritance and interface inheritance?
What is the use of delegate?
What is singleordefault?
What is private class in c#?
If the original method is not static you can declare an override method to be static or not?
can you declare an override method to be static if the original method is not static?
Are c# objects passed by reference?
Can a class have multiple constructors c#?