how to set title within content page asp.net
<p>I have created a Content Page using Master Page.</p>

<p>Within Master Page, I have created the following tag for Title:</p>

<pre><code>&lt;head id="Head1" runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;   
    &lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /&gt;   
&lt;/head&gt;
</code></pre>

<p>Within Content Page, following are set:</p>

<p>protected void Page_Load(object sender, EventArgs e)
    {</p>

<pre><code>    if (!Page.IsPostBack)
    {
        if (String.IsNullOrEmpty(Request.QueryString["PatientRegistrationKey"]))
        {
           // ....
        }
        else
        {
            this.Page.Title = "My New Title";
            //....
        }
    }
</code></pre>

<p>Though I am also setting the Master Page at run time as bellow:</p>

<p>protected void Page_PreInit(Object sender, EventArgs e)
    {
        if (String.IsNullOrEmpty(Request.QueryString["PatientRegistrationKey"]))
            this.MasterPageFile = "~/MasterPages/A.master";
        else
            this.MasterPageFile = "~/MasterPages/B.master";
    }</p>

<p>While getting open this page in browser, I got following Title:</p>

<p><em><strong>http://localhost:3562/?PatientRegistrationKey=0 - My New Title</em></strong></p>

<p>Please advice for the changes, so that there should be only <strong><em>My New Title</em></strong> within title, nothing extra like query string etc.</p>

<p>Any help would be appreciated.</p>
