title: ASP.NET MasterPageFile causing error
body: <p>I'm trying to use a master page in my website.  I created a page and then created the master.  I then added the tag MasterPageFile="~/master".  I'm guessing that I need to do something to my main page, because I've now started getting the error: </p>
  
  <pre><code>The page contains markup that is not valid when attached to a master page
  </code></pre>
  
  <p>My main page is as follows:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" MasterPageFile="~/my.master" %&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;body&gt;
       &lt;form id="form1" runat="server"&gt;
       &lt;div&gt;
  
       &lt;/div&gt;
       &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I tried deleting the  tag thinking that this might be the issue.  Can anyone point me in the right direction?</p>