title: "Content Not Supposed to Be Outside 'Script' or 'asp:Content' Regions"
body: <p>I'm starting to learn ASP.NET and it's the little things that are really annoying with Visual Studio Web Dev Express. I keep getting the error "Content Not Supposed To Be Outside 'Script' or 'asp:Content' Regions" - so I put content inside an <code>asp:content</code> container and it doesn't disappear. I also get the same sort of error with declaring the DocType. Any suggestions to fix this. Also on an off-note: is there any better IDE's to code ASP.NET?</p>
  
  <pre><code>&lt;%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
      CodeFile="Default.aspx.cs" Inherits="_Default" %&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;Hello VS2010&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;asp:content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
          &lt;form id="form1" runat="server"&gt;
              &lt;div&gt;
                  &lt;asp:Literal ID="Literal1" runat="server"&gt;
                      Hello World
                  &lt;/asp:Literal&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/asp:content&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Master Page</strong></p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="SiteMaster" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /&gt;
      &lt;asp:ContentPlaceHolder ID="HeadContent" runat="server"&gt;
      &lt;/asp:ContentPlaceHolder&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form runat="server"&gt;
      &lt;div class="page"&gt;
          &lt;div class="header"&gt;
              &lt;div class="title"&gt;
                  &lt;h1&gt;
                      My ASP.NET Application
                  &lt;/h1&gt;
              &lt;/div&gt;
              &lt;div class="loginDisplay"&gt;
                  &lt;asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false"&gt;
                      &lt;AnonymousTemplate&gt;
                          [ &lt;a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server"&gt;Log In&lt;/a&gt; ]
                      &lt;/AnonymousTemplate&gt;
                      &lt;LoggedInTemplate&gt;
                          Welcome &lt;span class="bold"&gt;&lt;asp:LoginName ID="HeadLoginName" runat="server" /&gt;&lt;/span&gt;!
                          [ &lt;asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/&gt; ]
                      &lt;/LoggedInTemplate&gt;
                  &lt;/asp:LoginView&gt;
              &lt;/div&gt;
              &lt;div class="clear hideSkiplink"&gt;
                  &lt;asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"&gt;
                      &lt;Items&gt;
                          &lt;asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/&gt;
                          &lt;asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/&gt;
                      &lt;/Items&gt;
                  &lt;/asp:Menu&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="main"&gt;
              &lt;asp:ContentPlaceHolder ID="MainContent" runat="server"/&gt;
          &lt;/div&gt;
          &lt;div class="clear"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="footer"&gt;
  
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>