Dynamic controls lost when postback

Posted by Joren on Stack Overflow See other posts from Stack Overflow or by Joren
Published on 2010-03-16T15:51:05Z Indexed on 2010/03/16 15:51 UTC
Read the original article Hit count: 377

Filed under:
|

Hi

I load my self-made webuser controls dynamically. A user chooses a template and depending on that template I load some self-made webuser controls (.ascx) that are defined in a sql server database. When the user fills in the TextBoxes and clicks on the submit button, the entries in the TextBoxes should be saved in my database. The problem is that when clicking the submit button, the TextBox entries are erased. I searched a lot to fix this problem, for example I tried to load every control again every postback by putting the code in the Page_Init event but unfortunately it won't work.

© Stack Overflow or respective owner

Related posts about dynamic

Related posts about controls