auto incerment of textbox
auto incerment of textbox on click of button c# coding
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted May 26, 2014, 6:44 AM
Jignesh TrivediPosted May 26, 2014, 6:39 AM
hi,
you mean to say add new text box control on each button click?
please provide more information
Khan Abrar AhmedPosted May 26, 2014, 5:44 AM
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);
}