I have a page with two <asp:content> controls:
<asp:content ContentPlaceholderId="foo" id="content1">some content</asp:content>
<asp:content ContentPlaceholderId="bar" id="content2">some other content</asp:content>
In PreInit, I can set Page.MasterPageFile to whichever masterpage I want. But, if the masterpage I use doesn't have a contentPlaceholder called "bar", ASP.NET will throw an exception. So I want to find & delete that second <asp:content> control in PreInit -- before the MasterPage gets merged.
So far, I haven't found any way of accessing the <asp:content> controls... anybody out there know how?