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
What is heap and what is stack?
Do I have any control over the garbage collection algorithm?
How to view a .NET assembly?
Explain the difference between .net 2000 and .net 2005(features)? Which one is better?
SAP Business One(this is intigrated tool of .net)
How many types of generations are there in a garbage collector?
What is a design pattern and what is it for?
What are multicast delegates?
Explain what is immutability, what is it for and how is it codified?
What is garbage collection and how it works ?
what will do to avoid prior case?
What is Event Bubbling in .NET?
Please explain what are an object and a class?
When we use windows api in .net is it managed or unmanaged code?
How to convert a .NET object into COM operabililty?