Modifying a server control’s parent control collection
At work, I was tasked with creating a specialized version of the standard DetailsView server control. My job was to make sure the control would have all the properties and functionality that DetailsView have, and add some of our own. However, the challenge was that when our server control should render itself, it should wrap itself inside a Panel server control. In other words this:
<My:CustomDetailsView</My:CustomDetailsView>
Should render itself as:
<asp:Panel><My:CustomDetailsView></My:CustomDetailsView></asp:Panel>