Hello,
Maybe you have to also Dispose the control after removing from it from the controls collection. I had similar issues before and it seems that the problem is caused by some 'refreshing' issue.
So maybe this would help:
loControl = oProcess.oPage.FindControl("Form1")
oProcess.oPage.Controls.Remove(loControl)
loControl.Dispose()
>In a particular situation, I need to remove a control from a page. I have this code:
>
>
>loControl = oProcess.oPage.FindControl("Form1")
>oProcess.oPage.Controls.Remove(loControl)
>
>
>where oProcess.oPage is a reference to the page.
>
>I have put some insertion line to really show that loControl is really a reference to Form1. But, after the Remove() line, the control still exists.
>
>What am I missing?
robert.oh.