8
Answers

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

Dinusha Gamage

Dinusha Gamage

11y
28.2k
1

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)