Hi,
I have a windows forms app. I would like to change the textbox name programmatically. Is there a way to do it?
Thanks in advance & Best Regards.
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
Amitesh VermaRank #2,535 · 552 reputationPosted Aug 3, 2015, 3:48 AM EDT
txtBox.Name = "readIn";
txtBox.Text = "text to example!";
this.Controls.Add(txtBox);
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 3, 2015, 4:28 AM EDT
TextBox txtBox = new TextBox();
txtBox.Name = "NewMsg";
txtBox.Text = "Hello test!";
this.Controls.Add(txtBox);
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 3, 2015, 4:43 AM EDT
Narasimha Reddy ChennupalliRank #1,163 · 1.6K reputationPosted Aug 11, 2015, 2:40 AM EDT
Piyush Modhavadiya7 reputationPosted Aug 12, 2015, 8:55 AM EDT