title: ASP.net access a master page variable through content page
body: <p>I have a master page:</p>
  
  <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" Codefile="AdminMaster.master.cs" Inherits="AlphaPackSite.MasterPages.AdminMaster" %&gt;
  </code></pre>
  
  <p>Then I have a public variable:</p>
  
  <pre><code>public partial class AdminMaster : System.Web.UI.MasterPage
  {
      protected bool blnShowDialogue = false;
  </code></pre>
  
  <p>In my <em>content page</em> I would like to set this variable:</p>
  
  <pre><code>blnShowDialogue = true;
  </code></pre>
  
  <p>So that in my master page I can have the code:</p>
  
  <pre><code>    $(function() {
      &lt;%if(blnShowDialogue == true){%&gt;
          $("#dialog").dialog();
      &lt;% } %&gt;
      }
  </code></pre>
  
  <p>Does this make sense?  When I try combinations of Master.blnShowDialogue, or blnShowDialogue = , etc etc nothing seems to work.</p>
  
  <blockquote>
    <p>The name 'blnShowDialogue' does not
    exist in the current context</p>
  </blockquote>