hi friends,
is there away to make a textbox accept only numeric, del key and backspace key?
I used the following code but it doesn't work:
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if ( char.IsDigit(e.KeyChar) == true || e.KeyChar == Convert.ToChar(Keys.Back) || e.KeyChar == Convert.ToChar(Keys.Delete) ) { e.Handled = true; } }
thanks
I use Visual studio 2010 professional and SQL server 2008 developer edition!