Groups | Blog | Home
all groups > dotnet general > july 2005 >

dotnet general : key press event in .net


dave
7/2/2005 1:14:02 PM
I am developing an application in .net. I have various textboxes on the
forms and need to include data validation, or at least restrict the users
input. How do I go about allowing only letters to be entered into a textbox
using the above mentioned event? Further, I want to allow only numbers and
letters to be entered in. I don't want to enter in e.keychar="!" orelse
e.keychar=">", etc. I have converted the contents to uppercase already.

Thanks,
Jon Shemitz
7/2/2005 6:37:18 PM
[quoted text, click to view]

Char.IsLetterOrDigit()

--

Cor Ligthert
7/3/2005 10:56:34 AM
Dave,

In addition to Jon, I use forever for this kind of operations the Key up to
get as much as posible possibilities from the eventargument.

I hope this helps,

Cor

AddThis Social Bookmark Button