2
Answers

How to prevent dynamically created controls from vanishing during postback ?

Ask a question
sandeep ram

sandeep ram

14y
5.4k
1

Hi,
I have a user entry field ( a textbox ) where the user will enter some integer value...lets say "X" ...and then click on a Button called "Create".
On Button_Click I have to create X number of TextBoxes - so this is to be generated dynamically.
My problem is that, the textboxes that are created like this are "vanishing" or are lost during postback. How do I retain these dynamically created controls across postbacks ??

Answers (2)