Dynamically change MasterPage and ContentPlaceHolderID of asp content tag?
<p>I have a page which initially inherited from MastePage.master . And I want to use the same page but with different masterpage(MasterPage2.master) at some other place in my project. For that I am using the following code.</p>

<pre><code>private void Page_PreInit(object sender, EventArgs e)
    {
        if (Request.QueryString["Update"].ToString() == "New")
        {
            this.MasterPageFile = "MasterPage2.master";
            Content con = new Content();
            con = (Content)this.FindControl("Content1");
            this.Content1.ContentPlaceHolderID = "ContentPlaceHolder2";
        }
    }
</code></pre>

<p>I am also trying to set the asp content tag's ContentPlaceHolderID to ContentPlaceHolder2 which is from MasterPage2.master. Initially it was ContentPlaceHolder1.</p>

<p>But I am getting null value at  con = (Content)this.FindControl("Content1");</p>

<p>Thanks</p>
