Hello everybody.
I'm working with an aspx page, where once I click on a button, some calls are executed in the background and I display the returned information on the webpage. I do this by adding this information to a panel:
panel.controls.add(label)
panel.controls.add(anotherpanel)
Problem is that once I click the button again, and I get some new objects from the background calls the UI elements (those labels and panels) still remain visible and my new information is just added after the previous one.
I would like to have all the previous information gone once I press the new button.
I've tried panel.controls.clear()
, but it doesn't do anything.
Any ideas? Thanks.