First up, in your original post you said:That says that you don't want the user to enter any numbers. I'm guessing now that that's just the language barrier and what you actually want is for the user to enter nothing but numbers. Is that correct? If so then the code would be:my question is, how can i prevent user to input integer values.in the KeyPress event handler.csharp Code:
char keyChar = e.KeyChar; e.Handled == !char.IsControl(keyChar) && !char.IsDigit(keyChar);




Reply With Quote