| Author: ajay 18 Jun 2008 | Member Level: Bronze | Rating: Points: 2 |
Just write this code in ur user control for that particula control private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (!((e.KeyChar >= 48 && e.KeyChar <= 57) || e.KeyChar == 8)) { e.Handled = true; MessageBox.Show("Please enter Numbers", "Communication Equipment Inventory", MessageBoxButtons.OK, MessageBoxIcon.Information);
} }
|