Jan 12, 2010, 5:56 AM
[CLOSED] [1.0] Add and remove Panel runtime
Hi,
I have a Main Filter panel i need to populate with different filter (every filter=one panel) that i load from DB.
The main filter panel is designed in markup, so exist from the very begin.
I add a filter panel to the main panel runtime after a button click with this method:
(note: CreaFiltro return a Panel - Filtri is the Main panel, create in markup, in the aspx page)
but if I want to remove, after a button click, a panel created runtime (with the previous method) my code doesn't work:
</p>
Filtri.Items.Add(here new panel)</p>or
PannelloFiltro.Render(Filtri.ClientID, RenderMode.AddTo)
Thanks
</p>
I have a Main Filter panel i need to populate with different filter (every filter=one panel) that i load from DB.
The main filter panel is designed in markup, so exist from the very begin.
I add a filter panel to the main panel runtime after a button click with this method:
(note: CreaFiltro return a Panel - Filtri is the Main panel, create in markup, in the aspx page)
Dim PannelloFiltro As Panel = CreaFiltro(Filtro, True)
PannelloFiltro.Render(Filtri.ClientID, RenderMode.AddTo)
</p>but if I want to remove, after a button click, a panel created runtime (with the previous method) my code doesn't work:
</p>
Filtri.Remove(PannelloFiltriDisponibili.ClientID)
Whta's the difference between adding (runtime) an item with Filtri.Items.Add(here new panel)</p>or
PannelloFiltro.Render(Filtri.ClientID, RenderMode.AddTo)
Thanks
</p>