Hi, Bhavna
Try a easy solution
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar >= 65 && e.KeyChar <= 91) || (e.KeyChar >= 97 && e.KeyChar <= 123))
{
if (i && e.KeyChar == 69)
{
i = false;
}
else if (e.KeyChar!=69)
{
e.Handled = true;
}
}
}
there are some more ways you should find out, it's work