I have a piece of code like this:
<div id="container" runat="server">
<div id="parent" runat="server">
<div id="child" runat="server">
<p>Some Content</p>
</div>
</div>
</div>
In a certain situation i want to remove the parent DIV and leave the child DIV intact.
Using something like this removes the complete html (parent + child):
container.Controls.Remove(container.FindControl("parent"))
or
parent.visible = false
Is it possible to keep the html within the parent DIV (child DIV) and removing the surrounding parent DIV?
Any help appreciated.
Marcellino
Try this
1. For Server side solution
2. For Client side solution