title: ASP.net - Name does not exist in the current context
body: <pre><code>public partial class Site : System.Web.UI.MasterPage
  {
      //page load event
      protected void Page_Load(object sender, EventArgs e)
      {
          //displaying current date on the label
          lblDate.Text = DateTime.Now.ToString();
      }
  }
  </code></pre>
  <p>and in <em>site.master</em> I have:</p>
  <pre><code>&lt;header&gt;
  &lt;h2&gt;Two Column Layout.&lt;/h2&gt;
  &lt;br /&gt;
  &lt;div id=&quot;displayDate&quot;&gt;
  &lt;asp:Label runat=&quot;server&quot; ID=&quot;lblDate&quot; /&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Here is the code from the top of the <em>.master</em> file as requested:</p>
  <pre><code>&lt;%@ Master Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Site.master.cs&quot; Inherits=&quot;MillerDylanTwoColumn.site&quot; %&gt;
  </code></pre>
  <p>The error I'm getting is:</p>
  <blockquote>
  <p>Error CS0103  The name 'lblDate' does not exist in the current context</p>
  </blockquote>
  <p>Can anyone show me where I went wrong?</p>