开发者

Accordion Control - Accordion Pane not visible on PostBack

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜