the easy way would be to put a range validator control linked to the textbox...
Is that what you want? Or are you talking about excluding the keypress action if the key is not a number... ??
You don't have that capability in VS.NET anymore. The only way would be the KeyPress event.
Put aside that you have to create such event, then it's just an if condition where you check if the Chr() value (I'm not sure what it's called now in .NET) of the KeyPressed is in between Chr(0) and Chr(9)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.