views:

311

answers:

2

I just don't understand how this is done. I've gone through several questions here and from a few other websites.

Basically, a company will be adding process steps, and I want there to be a textbox with a button next to it that reads "Add another step." Once clicked, a new textbox will appear beneath the current one, and the button will be moved next to the new text box. What do I need to do?

A: 

Well things will get a little more complex once you ask how to maintain ViewState. However, since you didn't ask that (yet), the simple answer is just that on button click event you should instantiate a new TextBox and Insert it into the Controls before the Button.

statichippo
I've done that, but it only adds one more, then it doesn't do anything but refresh the page it seems
Justen
A: 

Okay, finally found an answer I can understand. Using listviews seems to be a good way to go. I found this website

http://geekswithblogs.net/QuandaryPhase/archive/2008/10/19/asp.net-alternatives-to-dynamic-controls---part-1.aspx

And I got the results I wanted.

Justen