Hello guys! In my application i have textbox where a student has to enter his/her name.I have validated it so that it accepts only letters but the problem is if i want to delete something when typing i have to use the delete button only.I cant use the space tab as well...help me i am stuck. Here is my code
private void txtSur_KeyPress(object sender, KeyPressEventArgs e)
{
if (!Char.IsLetter(e.KeyChar))
{
e.Handled = true;
MessageBox.Show("Enter Letters Only", "Invalid Character", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}