title: Label does not exist in current context on ASP.NET page
body: <p>There are many questions with same name as this one, but I haven't found solution.</p>
  
  <p>MasterPage.master:</p>
  
  <pre><code>&lt;div id="dateShow"&gt; 
      &lt;asp:Label ID="lblDateShow" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>MasterPage.master.cs:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      lblDateShow.Text = DateTime.Now.ToShortDateString();
  }
  </code></pre>
  
  <p>It happens on building and show me the error, but if I run without building (before run-->no build) it shows me the date. It happens only in master page with all controls that I want to add, on other pages all work fine. What could be the problem?</p>
  
  <p>Error Message is:</p>
  
  <p>Error   1   The name 'lblDateShow' does not exist in the current context    </p>
  
  <p>Long discription:</p>
  
  <p>Warning 2   The type 'MasterPage' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\thegame\6da1e5d1\9152b07\App_Web_tmu2ya5i.4.cs' conflicts with the imported type 'MasterPage' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\thegame\6da1e5d1\9152b07\App_Web_masterpage.master.cdcab7d2.k9aa16y-.dll'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\thegame\6da1e5d1\9152b07\App_Web_tmu2ya5i.4.cs'.    c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\thegame\6da1e5d1\9152b07\App_Web_tmu2ya5i.4.cs    </p>
  
  <p>I tried to delete Temp files, didn't help..</p>
  
  <p><strong>UPD</strong> I solved that problem. I Had another masterpage2.master and somehow he did all the problems. When I created label or other control, he was declared in second master page, I don't know how can it be)) </p>