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


Please Help Members By Posting Answers For Below Questions

Explain the difference between the while and for loop. Provide a .net syntax for both loops?

507


Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component

1856


What is reflection and what is it for?

576


Explain re-clarification of object based in .net?

576


What is the difference between .net and laravel?

575






Explain can 2 different applications use the same dll in gac at the same time?

578


What is SOAP? How you will do windows and forms authentication?

589


Is there any inbuilt tool or command provided by .NET to view the code inside the assembly?

609


Do you know the difference between the stack and the heap?

536


What is the use com component in .net?

582


what is machine key error in .NET how can we solve it?

2101


How do you trigger the paint event in system.drawing?

529


Explain is the jit an interpreter?

568


What is the difference between task and thread in .net?

609


What’s different between process and application in .net?

595