Control Persistence
-
Hi, I'm trying to implement something similar to this article using the release version of ASP.NET AJAX Extensions and plain old .NET 2.0. I have a
UserControl
called Dashboard.ascx which contains severalPanel
controls.Dashboard
overrides theCreateChildControls
method and on the first page load (usingScriptManager.GetCurrent(Page).IsInAsyncPostBack
) it populates eachPanel
with user controls of typeWidgetContainer
. This works fine and everything gets rendered as expected.WidgetContainer
contains twoUpdatePanel
s and when a child control (in this case a LinkButton) causes an async post back the reponse doesn't contain the contents of the UpdatePanel and on the next click all the WidgetContainers dissapear. So my question is, how are controls added programatically persisted accross post backs? I assumed the ControlCollection class would handle this but apparently not as all the controls I add are getting removed. Any suggestions? Cheers -
Hi, I'm trying to implement something similar to this article using the release version of ASP.NET AJAX Extensions and plain old .NET 2.0. I have a
UserControl
called Dashboard.ascx which contains severalPanel
controls.Dashboard
overrides theCreateChildControls
method and on the first page load (usingScriptManager.GetCurrent(Page).IsInAsyncPostBack
) it populates eachPanel
with user controls of typeWidgetContainer
. This works fine and everything gets rendered as expected.WidgetContainer
contains twoUpdatePanel
s and when a child control (in this case a LinkButton) causes an async post back the reponse doesn't contain the contents of the UpdatePanel and on the next click all the WidgetContainers dissapear. So my question is, how are controls added programatically persisted accross post backs? I assumed the ControlCollection class would handle this but apparently not as all the controls I add are getting removed. Any suggestions? Cheers