in Education by
I am working on a silverlight app that you need to enter information into a textbox and then just hit enter. Well there is no onclick event, that I could find, so what I did was use the onkeypressup event and check if it was the enter key that was pressed if so do "blah". It just feels like there is a better way to do this. So the question is, is there? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I thinks that's the way to catch Key.Enter. Also, you're code will be more readable if you use the KeyDown event instead of the KeyUp event. If you only care about catching Key.Enter for a single control then your approach is correct. You can also catch the Key.Enter for a group of related controls by using the KeyDown event of their container ("Event Bubbling").

Related questions

0 votes
    I'm am adding the following code to the constructor of App.xaml.cs in my WP7 application. Resources[ ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    As the title suggests, I'm just looking for a way of pressing a button in Shoes without clicking ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    If a user hits enter in a windows forms textbox with a KeyUp Event, windows sounds a beep or ding ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    I'm trying to make the text move continuously by pressing a button but right now it only moves an ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 1, 2022 in Education by JackTerrance
0 votes
    So the problem is i don't get get a value from textbox field on GridView RowUpdating event. Here ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    I run a community website and youtube channel, and I am trying to write a script that lets a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 7, 2022 in Education by JackTerrance
0 votes
    I run a community website and youtube channel, and I am trying to write a script that lets a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    From my silverlight 4.0 application. I can access the WCF File easily but when moved to https, I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    13. Pressing the Home Key, moves the cursor to the__________ (a) Beginning of the line (b) Beginning of the ... Beginning of the page Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    You are reading a word document containing 10 pages. You reach the 3rd page of the document by pressing the Page ... pressed by you? Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    You are reading a word document containing 10 pages. You reach the 3rd page of the document by pressing the Page ... pressed by you? Select the correct answer from above options...
asked Dec 18, 2021 in Education by JackTerrance
0 votes
    1.We can insert a new line by pressing the_________ key. 2.The____________ tab has the new option that ... where the_____is placed Select the correct answer from above options...
asked Dec 17, 2021 in Education by JackTerrance
0 votes
    I am very new to VB and am exploring this method to simplify mundane manual work process of highlighting ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I have a small calculator that I am creating in C# (Sharp Develop). The user enters two values ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I have a small calculator that I am creating in C# (Sharp Develop). The user enters two values ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
...