Why dynamically created user controls disappear when controls are not doing full postbacks?

后端 未结 2 2045
执念已碎
执念已碎 2021-01-06 22:20

Based on my current understandings, when you have an UpdatePanel control there is no full postback. Therefore if I dynamically add custom user controls and they have UpdateP

2条回答
  •  被撕碎了的回忆
    2021-01-06 23:10

    OK based on my current understandings, when you have an UpdatePanel control there is no full postback.

    Postbacks triggered from UpdatePanels always execute the full page life-cycle. All the events are triggered normally. It makes no difference whether you use an UpdatePanel or not. Every time you add a control programmatically you need to re-add it on every postback.

    Read this post, it may help you understand a bit better what's going on here.

提交回复
热议问题