Hi,

I want to make a simple application which adds textBoxes when a button is pressed.
My friend suggested me to make a List of text Boxes and add a textBox each time the button is pressed but i didn't get it.

please help.

Thanks in advance.

Recommended Answers

All 2 Replies

Is this WPF or WinForms?

List of textBoxes is a bad idea. But you can do it with Array or HashTable. Store the value of the TextBox in an Array and finally through a loop add them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.