What about TextBox that accepts digits only?Sound very simple and ancient problem. So I believe you figured out your coding blocks as well. If you are thinking about any kind of Integer validation or input value comparison using couple of conditions then, I would like to request you to drop it, because the way I am going to tell you is quite precise, neat and clean.
So just have a look.
So what I am doing under this code snippet, Under keyPress event I am doing Runtime value checking. So my textbox will accept only digits, other values it wont show.
So without any nasty validations, you can get a textbox that will accept only digits.
So without any nasty validations, you can get a textbox that will accept only digits.

