Click here to Skip to main content
15,918,889 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi all

i am adding some controls in asp.net during run time using asp panel... after adding that asp panel control i want to remove that panel control alone not control inside the panel... how we can do this
Posted
Comments
Thanks7872 10-Dec-14 8:33am    
Why?

1 solution

The controls you try to remove are child-controls of the panel, so removing the panel removes the child-controls too!
So you have two options:
1. Add the controls to other container (possibly the parent of the panel) from the beginning
2. If there is some need to add the controls to the panel before removing the panel - MOVE the controls to other container (possibly the parent of the panel) before removing the panel
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900