title: ASP.NET (Content is not supported outside the script or asp:content)
body: <p>I have created a nav bar on a nested master page that allows there to be a nav bar on each web form page that is created from it. I keep getting an error at the &lt; html > tag on the top of the page as stated in the title. The code for the pages I have is as follow.</p>
  
  <p>NestedMasterPage1.Master:</p>
  
  <pre><code> &lt;%@ Master Language="C#" MasterPageFile="~/Site.Master"
   AutoEventWireup="true" CodeBehind="NestedMasterPage1.master.cs"
   Inherits="TGASAttempt.NestedMasterPage1" %&gt;
       &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;link href="StyleSheet.css" rel="stylesheet" /&gt; &lt;link
   href="https://fonts.googleapis.com/css?family=Work+Sans"
   rel="stylesheet"&gt;
  
       &lt;title&gt;Navbar&lt;/title&gt; &lt;/head&gt; &lt;body&gt;
       &lt;header&gt;
  
           &lt;div class="container"&gt;
               &lt;img src="TGASlogo.png" alt="logo" class="logo"&gt;
  
               &lt;nav&gt;
                   &lt;ul&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Home Page&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;About&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab1&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab2&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab3&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab4&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab5&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab6&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab7&lt;/a&gt;&lt;/li&gt;
                       &lt;li&gt;&lt;a href="~/"&gt;Tab8&lt;/a&gt;&lt;/li&gt;
                   &lt;/ul&gt;
               &lt;/nav&gt;
  
           &lt;/div&gt;
       &lt;/header&gt;
       &lt;div&gt;
               &lt;asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"&gt;
               &lt;/asp:ContentPlaceHolder&gt;
           &lt;/div&gt; &lt;/body&gt; &lt;/html&gt;
  </code></pre>
  
  <p>HomePage.aspx</p>
  
  <pre><code> &lt;%@ Page Language="C#" MasterPageFile="~/NestedMasterPage1.master"
   CodeBehind="Home Page.aspx.cs" Inherits="TGASAttempt.WebForm1"  %&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>Site.Master</p>
  
  <pre><code> &lt;%@ Master Language="C#" AutoEventWireup="true"
   CodeBehind="Site.master.cs" Inherits="TGASAttempt.Site" %&gt;
  
   &lt;!DOCTYPE html&gt;
  
   &lt;html&gt; &lt;head runat="server"&gt;
       &lt;title&gt;&lt;/title&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>