Custom server control disappears from page when UpdatePanel updates
Posted
by Sasha
on Stack Overflow
See other posts from Stack Overflow
or by Sasha
Published on 2010-05-23T18:15:33Z
Indexed on
2010/05/23
18:20 UTC
Read the original article
Hit count: 248
asp.net-ajax
|updatepanel
Hi all. I created a custom asp.net server control. It works fine on a regular asp.net page and as a DOM object inside of the browser. But I've never used the UpdatePanel before and now I'm trying to make sure that this control works there as well. It doesn't. If I add my control to the page outside of an update panel and click some panel's inside button (trigger), everything works fine. But if I place my control inside of update panel and click that button again, the control "disappears" from the page completely. I still can see my control in javascript debugger and the update, meaning that the object itself is still in DOM. It looks like the panel just "hides" the outer div element of my control for some reason. I tried to call panel's Update() method on button click handler, set panel's UpdateMode to both Conditional and Always. All with the same result. How can I fix that? Thank you!
© Stack Overflow or respective owner