title: ASP.Net Calling Site.Master method from web page not working
body: <p>I saw on several web pages how to interface to a public method defined in a master file from a web page call behind code that uses that master file.</p>
  
  <p>(I am using ASP.Net 4.0 on Visual Studio 2012.)</p>
  
  <p>The procedure is (copied from article):</p>
  
  <blockquote>
    <p>Make sure the function is accessible to the page (i.e. declared
    public), and use the MasterType declaration in the ContentPage:</p>
  
  <pre><code>&lt;%@ Page .... %&gt; 
  &lt;%@ MasterType VirtualPath="~/masterpage.master" %&gt;
  </code></pre>
    
    <p>In the page, use Page.Master.MyFunction() to access the function. 
    *Note: before being able to access the function, you'll need to save &amp; build.</p>
  </blockquote>
  
  <p>The problem is that I do not see the method.  Here is what I have:</p>
  
  <p>Web Page (stored in /MyFolder, so /MyFolder):</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Logout.aspx.cs" Inherits="BvCorpMain.Candidates.Logout" %&gt;
  &lt;%@ MasterType VirtualPath="/SiteMasters/Site.Master" %&gt;
  </code></pre>
  
  <p>Site.Master CS file (stored in /SiteMasters folder):</p>
  
  <pre><code>public void UpdateUserBlocksToCookie()
  {
  }
  </code></pre>
  
  <p>When I go into the code behind for the logout page and in a method I type in "Page.Master.", I do not see my method.</p>