I'm adding a significant amount of server controls to a dataGrid on a
webform at runtime. Server controls are mostly textboxes, dropdowns, and
labels. Should I manually dispose each control after adding it to avoid
weighing down the server?
I'm doing something along these lines:
Loop {
Dim myControl as new system.web.ui.webcontrols.SomeControl
myGrid.item(i).cells(ii).add(myControl)
myControl.Dispose()
}
I'm wondering if disposing the control would even help; does the dataGrid
still hold a reference to it, or a copy of it?
Thanks,
Brad Kazmer
*****
"The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential, proprietary, and/or
privileged material. Any review, retransmission, dissemination or other use
of, or taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from all
computers."