Hello,
How can i activate enter key to act like tab on textfields?
Thank you in advance.
Enter key as a tab
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
nitin murkute12 reputationPosted Oct 6, 2009, 2:10 AM EDT
You have to monitor keypress event of the textbox and on enter key press set the focus to next control.
This has to be done using javascript.
HTH
Kirtan PatelRank #292 · 8.6K reputationPosted Oct 6, 2009, 2:17 AM EDT
Dont forget to mark "Do you like answer" please :) it will give me some credits :)
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
{
e.Handled = true;
SendKeys.Send("{TAB}");
}
}
If Getting Problem let me know :)
Thank you :)