Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How server form post-back works?

1047


What is the difference between .net and laravel?

984


Explain difference between panel and groupbox classes using .net?

986


How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?

966


What's singleton activation mode in .net?

1040


What is value type and refernce type in .net?

1018


Can a dll be changed to an exe?

1091


Explain why do we use the “using” statement?

1004


What is interface and abstract class in .net?

988


Explain what is the difference between encrypting a password and applying a hashing?

1046


Dynamic Fonts

1881


Explain what is the difference between constants and read-only variables?

909


What is difference between system.string and system.stringbuilder classes?

1120


What is boxing and un-boxing in .net?

1031


How do you create threading in.net?

958