0
votes

i am dynamically adding and removing a different user control from a to a place holders.

The user controls have lot of asp.net controls like cascading dropdowns with autopostback true.

The whole page is in a update panel.

After every postback i again add the control added previously and the which control is added previously is maintained in a view state.

The problem: Only first time the content in the textboxes get cleared after the first postback(caused by changing the dropdown)

Any help is appreciated

1

1 Answers

0
votes

You need to make sure that your dynamic controls are being added in the Page_Init event in order for them to retain their data.