Does the RemoveControl function set the object to Nil? Does it also remove it from the page right away?
I’ve found that setting an object to Nil does not necessarily remove it from the page. I stumbled across this function and want to be sure of how it works.
Each webcontrol is added to an array on the page so it won’t go out of scope if you don’t have your own reference. That’s the only way controls that are dragged onto a layout would ever work. So yes, the proper way to remove a control from a page is with the RemoveControl method. Just setting the item to nil, still leaves a reference in the internal array.