How can i set first char in capital...
How can i set first character in capital in textbox..
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Mar 26, 2015, 5:29 AM EDT
if (textBox2.Text.Trim().Length == 1)
{
textBox2.Text = textBox2.Text.ToUpper();
textBox2.SelectionStart = textBox2.Text.Length;
}
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Mar 26, 2015, 3:32 AM EDT
private void textBox2_TextChanged(object sender, EventArgs e)
{
if (textBox2.Text.Trim().Length == 1)
{
textBox2.Text = textBox2.Text.ToUpper();
}
}
Khargesh RajputRank #616 · 3.9K reputationPosted Mar 26, 2015, 4:15 AM EDT
Feroz Khan69 reputationPosted Mar 26, 2015, 4:50 AM EDT