Ok, call me an idiot.
It appears that with the placeholder "phdocumentmenus" when
recreating the dynamic controls on postback I was not recreating the
reference to the "click handler"
Now it functions.
For reference, Here is the snippet as it exists now from my page load
Dim lst As List(Of C1.Web.Command.C1WebMenu) = Session
("DocumentMenus")
If Not lst Is Nothing Then
phDocumentMenus.Controls.Clear()
For Each Menu As C1.Web.Command.C1WebMenu In lst
phDocumentMenus.Controls.Add(Menu)
AddHandler Menu.ItemClick, AddressOf FolderMenuClick
Next
End If
Steve
On Nov 23, 11:51 am, "[email protected]" <[email protected]>
wrote:
> Hi All,
> I seem to be having a problem. I have an update panel with a
> placeholder for dynamic controls. The problem is that the controls I
> add to the placeholder do not seem to be refreshing the updatepanel.
>
> <asp:UpdatePanel ID="pnlNavigation" runat="server"
> ChildrenAsTriggers="true" UpdateMode="Always">
> <ContentTemplate>
> <asp:Label runat="server" ID="lblOutput" />
> <asp:TreeView ID="tvFolders" runat="server"
> CssClass="TreeView" EnableViewState="true">
> <HoverNodeStyle CssClass="TreeViewHover" />
> <SelectedNodeStyle
> CssClass="TreeViewSelected" />
> <NodeStyle CssClass="TreeViewNode" />
> </asp:TreeView>
> <asp:PlaceHolder ID="phNodeMenus" runat="server"></
> asp:PlaceHolder>
> <asp:PlaceHolder runat="server"
> ID="phDocumentMenus"></asp:Placeholder>
> </ContentTemplate>
> </asp:UpdatePanel>
>
> Controls added to phNodeMenus seem to update the panel without issue.
> The other set of controls (added to phDocumentMenus do not.
>
> The event code runs and executes correctly. The only thing that seems
> to be missing is the panel refresh.
>
> Does anyone have any ideas (Yes, I do recreate the controls in the
> page_load, with each postback)
>
> Thanks in advance,
>
> Stephen