Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot remove a control
Message
From
14/05/2008 00:39:52
 
 
To
14/05/2008 00:12:45
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01316884
Message ID:
01316890
Views:
14
>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?

Haven't done ASP.NET for a while but IIRC simply setting visible to true results in the control not being included in the output?
HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform