Hello,
I have a textfield and i want when i press enter key to run a function?
How can i do that?
Thank you in advance!
Run code when enter is pressed
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
naura paxRank #2,843 · 502 reputationPosted Oct 5, 2009, 3:16 AM EDT
if (e.KeyCode==Keys.Enter)
{
///your code goes here.
}
DealyRank #9,518 · 205 reputationPosted Oct 5, 2009, 3:28 AM EDT