Real simple realy. I have a user control with a textbox. The end user chooses how many textboxes should be added to the page, so I have to add them dynamically. When he clicks on a button (which is on the main page) all the Text properties from the textboxes/user controls should be saved.
I check the text properties in the on click event and all the user controls are gone from the page. I read that I have to re-create them during the life cycle.
Ok, I re-create the user controls in the Page_Init. The controls are there now but the textboxes are all empty. The values have disapeared.
I guess this has something to do with the ViewState. Doesn't the viewstate recursivly go through the form and re-create all controls and their values? Why doen't it do that with dynamically added controls?
Please help. I want to learn.
...
Go to the complete details ...