Setting masterpage literal results in blank output
<p>Wondering if someone can help me out here. New to ASP.NET.</p>

<p>Trying to output the PageName in a masterpage.</p>

<p>Masterpage has a Literal in  which I am setting by accessing a property on the MasterPage "PageTitle".</p>

<pre><code>&lt;head runat="server"&gt;
    &lt;title&gt;&lt;asp:Literal ID="litTitle" runat="server"/&gt;&lt;/title&gt;
    &lt;asp:ContentPlaceHolder ID="head" runat="server" /&gt;
&lt;/head&gt;
</code></pre>

<p>The child page is like this:</p>

<pre><code>&lt;asp:Content runat="server" ContentPlaceHolderID="content"&gt;
&lt;%
    MasterPage master  = Master as MasterPage;
    master.PageName = "Log in";
%&gt;
&lt;/asp:Content&gt;
</code></pre>

<p>And the property PageName is coded thusly:</p>

<pre><code>    private string _pageName;
    public string PageName 
    { 
        get 
        { 
            return _pageName; 
        } 
        set 
        { 
            _pageName = value; 
            litTitle.Text = _pageName;
        } 
    }
</code></pre>

<p>I'm guessing this is because the page output has already been rendered, but as I say I don't know enough about ASP.NET. I guess I'm after something similar to PHPs ob_start().</p>
