开发者

Dynamic Usercontrol preservation on Async postback

开发者 https://www.devze.com 2022-12-08 03:06 出处:网络
I\'ve a control that dynamically loads other user controls.Upon Async postback from one of the child user controls i\'m reloading the session cached version of the child control.However the page_load

I've a control that dynamically loads other user controls. Upon Async postback from one of the child user controls i'm reloading the session cached version of the child control. However the page_load of this user control is not called when this occurs.

As a result there can be no event handling of this control. Presumably there is a better way to store the controls and subsequently load them. How would i do this?

Edit follow up question and solution here: Dynamic usercontrol post开发者_StackOverflow中文版back initialization


Create the dynamic controls normally on the postback, the ViewState will hook up the events for you once the dynamic usercontrol is back in the control tree.

0

精彩评论

暂无评论...
验证码 换一张
取 消