title: ASP.Net / C#: Replacing characters in a databound field
body: <p>In an ascx file I'm presenting data from a databound field like this:</p>
  
  <pre><code>&lt;%# Eval("Description")%&gt;
  </code></pre>
  
  <p>The data source is bound from code behind.</p>
  
  <p>Sometimes <code>Description</code> has some characters in it that I need to replace. I would love if I could just do something like this: </p>
  
  <pre><code>&lt;%# Replace(Eval("Description"), "a", "b")%&gt;
  </code></pre>
  
  <p>But of course that's not allowed in a databind operation <code>(&lt;%#)</code>.</p>
  
  <p>I don't want to hard code it in code behind because it would be so ugly to extract the field in code behind, maybe extract it to a variable and then output the variable on the ascx page. I'm hoping there is some (probably really easy) way I can do the replace directly on the ascx page.</p>