What TextBox Event to track when the user press the "enter" key

  • Thread starter Thread starter Kueishiong Tu
  • Start date Start date
K

Kueishiong Tu

I have a text box. I want to do some processing after the
user enters some data to the text box and press
the "enter" key. What TextBox event do I have to track to
detect this event?
 
Kueishiong Tu
on keypress event check for char value of keypresseventargs check the value
and process u'r task


pronojit
 
For a windows app, it's the Form's onKeyPress method.
For a web app, enter causes a postback, so you could check IsPostBack.
 
Back
Top