title: How to add master page after content page
body: <p>this is my newly added master page:</p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Feedback.master.cs" Inherits="Login.Feedback" %&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;Untitled Page&lt;/title&gt;
      &lt;asp:ContentPlaceHolder ID="head" runat="server"&gt;
      &lt;/asp:ContentPlaceHolder&gt;
      &lt;style type="text/css"&gt;
          .style1
          {
              width: 100%;
          }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
          &lt;table class="style1"&gt;
              &lt;tr&gt;
                  &lt;td height="166"&gt;
                      &lt;asp:AdRotator ID="AdRotator1" runat="server" DataSourceID="XmlDataSource1" /&gt;
                      &lt;asp:XmlDataSource ID="XmlDataSource1" runat="server" 
                          DataFile="~/App_Data/AdRotator.xml"&gt;&lt;/asp:XmlDataSource&gt;&lt;/td&gt;
                     &lt;td&gt; &lt;img alt="Welcome to Teachers Evaluation System" src="Images/welcome.png" 
                          style="width: 662px; height: 166px" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td valign="top"&gt;
          &lt;asp:ContentPlaceHolder ID="bodyContent" runat="server"&gt;
  
          &lt;/asp:ContentPlaceHolder&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is my login page. I want it to derive from Master. What changes do I need to make? It's giving a lot of errors. Also, I don't want to add any code to Master File - should I keep <code>Feedback.Master.cs</code> and <code>Feedback.Master.Designer</code></p>
  
  <pre><code>&lt;%@ Page Language="C#"  AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Login._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;Home Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
  
          &lt;asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
              onselectedindexchanged="DropDownList1_SelectedIndexChanged"&gt;
              &lt;asp:ListItem&gt;Administrator&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;Student&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;Faculty&lt;/asp:ListItem&gt;
              &lt;asp:ListItem&gt;Head of Department&lt;/asp:ListItem&gt;
          &lt;/asp:DropDownList&gt;
          &lt;br /&gt;
          &lt;br /&gt;
          &lt;br /&gt;
  
          &lt;asp:Label ID="Label1" runat="server" Text="User Name"&gt;&lt;/asp:Label&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;br /&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;br /&gt;
          &lt;asp:Label ID="Label2" runat="server" Text="Password"&gt;&lt;/asp:Label&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;asp:TextBox ID="TextBox2" runat="server" TextMode="Password"&gt;&lt;/asp:TextBox&gt;
  &amp;nbsp;&lt;br /&gt;
          &lt;br /&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Connect" 
              Width="79px" /&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;
          &lt;asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Login" 
              Width="70px" /&gt;
  
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>