开发者

Accordion Control - Accordion Pane not visible on PostBack

开发者 https://www.devze.com 2023-02-12 19:34 出处:网络
I am dynamically 开发者_高级运维adding Accordian Panes to an Ajax Accordion. On PostBack i cannot access the dynamically created Accordian Panes and ACC.Panes.Count=0

I am dynamically 开发者_高级运维adding Accordian Panes to an Ajax Accordion. On PostBack i cannot access the dynamically created Accordian Panes and ACC.Panes.Count=0

if the panes are not dynamically created everything works fine. so i think that is has to do with the DOM while creating the panes from code behind.

is there any workaround for my case?

is there any better control similar to Ajax Accordion?


You should redraw the accordion on the Page_Init event on each post back in order to be able to access them after the post back.


All dynamic-generated controls are lost on postback, that's why you must re-define them in your page's Init event, then they will be available always.

0

精彩评论

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