Yes, and I think I now know what the problem is....
You are dynamically generating the multiple text boxes on the event handler of the first postback. Then you cause another postback with a different button. The problem is that the page maintains viewstate data for control *properties* only. It does NOT maintain the hierarchical structure of the control tree. So when the second postback happens, those textboxes you generated in the event handler from the first postback aren't in the control tree and thus you can not access them.
The solution is to build the page in such a way that you can regenerate the dynamic list on every postback regardless of the event. This usually entails storing enough information in viewstate that you can reconstruct the dynamic controls. In your case, you need to store the number of textboxes created into a viewstate value.
1. Build a single method that constructs the textboxes and puts them where you need them. This method should look at the value in viewstate for the number. (You'll need to check for a null value and handle it gracefully.)
2. In your button click handler that generates the controls, set the viewstate value to the number chosen from the DDL and then call the new method.
3. In the page load event handler, call the method. This will regenerate the control structure on each page hit.
This is the basic process. From your description, it sounds like this basic implementation will cover your needs. (Strange things happen if you don't hide the control that manipulates what will be generated but you shouldn't have that problem with what you described.)
Good luck, and let us know how you do.
-
Peter