how to add fields when click add field?
if i have 3 textbox and 2 combobox in horizontly
i need one more row of same textbox and combobox
Windows form
2 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
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Mar 23, 2015, 10:31 PM EDT
Go through following links it will help you
http://visualcsharptutorials.com/windows-forms/dynamically-adding-controls
http://www.codeproject.com/Articles/16682/Dynamically-Adding-Button-to-a-Form
Joginder BangerRank #360 · 7K reputationPosted Mar 23, 2015, 10:40 PM EDT
txt.Text = "ABC"; this.Controls.Add(txt);
private void btnOk_Click(object sender, EventArgs e)
{ foreach (Control ctl in this.Controls) {
if (ctl.GetType() == typeof(TextBox))
}
}
try this code...