Nicholas,
I'm just using a placeholder as a container for the usercontrol. In a
buttonclick event I'm adding a usercontrol to the placeholder, and at some
point, another control will be added to the placeholder, and then the first
usercontrol should be removed from the placeholder.
Is there maybe a way to make it invisible?
-Lars
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> skrev i
en meddelelse news:u9******************@TK2MSFTNGP11.phx.gbl...
Lars,
At what point are you trying to remove the control? Once you have
written to the response stream, you really can't take it back (unless you
are buffering). Are you doing anything that might commit the control to
the stream before you are rendering it?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Lars Pedersen" <lsp*_AT_*oncable.dk> wrote in message
news:ub**************@TK2MSFTNGP11.phx.gbl... My app is adding a usercontrol at runtime. How is it possible to remove this usercontrol? Have tried Page.Controls.Remove(UserControl);, but that
wont do the trick - any suggestions?
-Lars