Auto incerment of textbox
auto incerment of textbox on click of button c# coding
3 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
Khan Abrar AhmedRank #778 · 3K reputationPosted May 26, 2014, 1:44 AM EDT
try this
int c = 0;
private void button1_Click(object sender, EventArgs e)
{
TextBox txtRun = new TextBox();
txtRun.Name = "txtDynamic"+c++;
txtRun.Location = new System.Drawing.Point(20, 18+(20*c));
txtRun.Size = new System.Drawing.Size(200, 25);
this.Controls.Add(txtRun);
}
Jignesh TrivediRank #16 · 50.3K reputationPosted May 26, 2014, 2:39 AM EDT
hi,
you mean to say add new text box control on each button click?
please provide more information
VulpesRank #55 · 29.2K reputationPosted May 26, 2014, 2:44 AM EDT