How to convert to Upper case the text you are typing in the text box?

Apr 29 2008 7:03 AM

Dear Friends,

Could you please help me anyone?

The problem is I need to convert the text into Upper case which you are typing in the text box. I applied the text_keypress event as  in the given below coding, but it doesn't work properly.

Plz help me.........

private void txtCustName_KeyPress(object sender, KeyPressEventArgs e)
{
            txtCustName.Text = (txtCustName.Text).ToString().ToUpper();  
}

 


Answers (8)