title: c# and Webforms - Using constants in HTML
body: <p>I'm looking for a way to use a constant (string) within HTML <code>&lt;p&gt;</code> tags.</p>
  
  <p>e.g. suppose within a <code>\Utils\Constants.cs</code> static class I have:</p>
  
  <pre><code>public const string BoysName = "Percy";
  </code></pre>
  
  <p>and I want to use this on the front end directly, e.g.</p>
  
  <pre><code>&lt;p&gt;When the shop opened [useConstantHere] was the first through the door!&lt;/P&gt;
  </code></pre>
  
  <p>to display </p>
  
  <pre><code>When the shop opened Percy was the first through the door!
  </code></pre>
  
  <p>I assume it's something like the below but I can't seem to get it working...</p>
  
  <pre><code> &lt;p&gt;When the shop opened &lt;% BoysName %&gt; was the first through the door!&lt;/P&gt;
  </code></pre>
  
  <p>Do I need to have a using statement in the code behind, or can I do it all from the aspx page? Is this even possible?</p>
  
  <p>I've done a similar thing with controls, e.g. labels, text boxes etc but I'd like to do it as above.</p>
  
  <p>Thanks.</p>