Hi,
I would like to control the user's input; In a textBox where the user is
only allow to put 0-9 (eg telephone number) I want to show a messagebox
if a user inputs a character like a-z..
Can someone help me with this?
Here's the code I started with, but don't know how to finish..
private void textBox1_KeyPress(object
sender,System.Windows.Forms.KeyPressEventArgs e)
{
string ex;
if(e.KeyChar ---> this will get the input's char.
MessageBox.Show("ERROR");
}
Cheers!
Claudi
*** Sent via Developersdex
http://www.developersdex.com ***