title: How to use C# constant at ASP.Net page?
body: <p>The examples given below could make little sense, but it is because I am focusing on syntax.</p>
  <p>Let's say I have such C# code:</p>
  <pre><code>public static class Foo
  {
    public const string Bar = &quot;hello world.&quot;;
  }
  </code></pre>
  <p>Now, I would like to use Foo.Bar constant in ASP.Net instead of typing each time &quot;hello world.&quot;. So I used this syntax:</p>
  <pre><code>&lt;p&gt;&lt;%= Foo.Bar %&gt;&lt;/p&gt;
  </code></pre>
  <p>It works. It works also in such cases:</p>
  <pre><code>&lt;p&gt;&quot;&lt;%= Foo.Bar %&gt;&quot;&lt;/p&gt;
  
  &lt;p class=&quot;&lt;%= Foo.Bar %&gt;&quot;&gt;the weird, nonsense example&lt;/p&gt;  
  </code></pre>
  <p>So, it works with quotes too. However I have also cases, when quotes get higher priority:</p>
  <pre><code>&lt;custom:Header runat='server' Text=&quot;&lt;%= Foo.Bar %&gt;&quot;/&gt;
  </code></pre>
  <p>( header is a custom control -- it simply adds some css by default and position ). In such case quotes marks have higher priority and entire text is sucked as-is, in effect I get header with text</p>
  <p>&lt;%= Foo.Bar %&gt;</p>
  <p>So, my question is -- <strong>what is the syntax to get the value of C# constant, no matter what (IOW -- with highest priority)?</strong></p>
  <h2>Edits:</h2>
  <pre><code>&lt;custom:Header runat='server' Text=&quot;&lt;%# Foo.Bar %&gt;&quot;/&gt;
  </code></pre>
  <p>(note hash instead of equal sign) does not work as well.</p>