title: asp:Literal tag in <head> being rendered in <body>
body: <p>I am trying to place an asp:literal tag in my  element on a master page.  When I set the value in the code behind for the master page and then view a page that is using this master page, the value of the literal is output in the &lt;body&gt;.</p>
  
  <p>I have the following Master Page: </p>
  
  <pre><code> &lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Test1.master.cs" Inherits="Corporate.Presentation.Web.Test1" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;asp:Literal runat="server" ID="ltlGoogleAnalytics"&gt;&lt;/asp:Literal&gt;
      &lt;asp:ContentPlaceHolder ID="head" runat="server"&gt;
      &lt;/asp:ContentPlaceHolder&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
          &lt;asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"&gt;
  
          &lt;/asp:ContentPlaceHolder&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Code Behind:</p>
  
  <pre><code>using System;
  
  namespace Corporate.Presentation.Web
  {
      public partial class Test1 : System.Web.UI.MasterPage
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              ltlGoogleAnalytics.Text = "test";
          }
      }
  }
  </code></pre>
  
  <p>Test ASPX page:</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Test1.Master" AutoEventWireup="true" CodeBehind="TestForm1.aspx.cs" Inherits="Corporate.Presentation.Web.TestForm1" %&gt;
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>HTML Output:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;head&gt;&lt;title&gt;
  
  &lt;/title&gt;&lt;/head&gt;&lt;body&gt;test
  
  
      &lt;form method="post" action="TestForm1.aspx" id="aspnetForm"&gt;
  &lt;div class="aspNetHidden"&gt;
  &lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTY1NDU2MTA1Mg9kFgJmD2QWAgIBD2QWAgIBDxYCHgRUZXh0BQR0ZXN0ZGQVhLZ0Btj29J7NtToygADkXCPCuLkULTvV5jvIb8hFFw=="&gt;
  &lt;/div&gt;
  
      &lt;div&gt;
  
  
      &lt;/div&gt;
      &lt;/form&gt;
  
  
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>