for the textbox if i want to allow only numbers.what ever
the characters u enter it should not take.which event u used?
Answer Posted / anjaan
Three events are triggered when a key is pressed and
released:
keydown
keypress
keyup
The keydown event occurs when the key is pressed, followed
immediately by the keypress event. Then the keyup event is
generated when the key is released.
In order to understand the difference between keydown and
keypress, it is useful to understand the difference between
a "character" and a "key". A "key" is a physical button on
the computer's keyboard while a "character" is a symbol
typed by pressing a button. In theory, the keydown and
keyup events represent keys being pressed or released,
while the keypress event represents a character being typed.
| Is This Answer Correct ? | 8 Yes | 10 No |
Post New Answer View All Answers
Explain the use of activex control in .net?
How to view a .NET assembly?
Difference between user groups and code groups
What is interface and abstract class in .net?
What is the advantage of packaging over xcopy in .net?
What is finalize method in .net?
How do you instantiate a complex number?
If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
What is static constructor, when it will be fired?
Is there any attempt system for microsoft technology papers?
What is heap and what is stack?
I am constantly writing the drawing procedures with system.drawing.graphics, but having to use the try and dispose blocks is too time-consuming with graphicsobjects. Can I automate this?
Tell about your technical profile ?
Compare client server application with n-tier application
What is reflection in microsoft .net context?