title: Asp.net grdiview: can i format the dataitems in an itemtemplate?
body: <p>i have this code in an itemtemplate in a gridview:</p>
  
  <pre><code>&lt;%# DataBinder.Eval (Container.DataItem, "DiscountAmount")%&gt;
  </code></pre>
  
  <p>It's a decimal value, and it shows 20.300000000000, which is technically right, but i'd prefer to show 20.30 or 20,30, depending on the culture.</p>
  
  <p>But i've never been a big fan of gridviews, and the <code>DataBinder.Eval</code>  and <code>Container.DataItem</code> haven't been good friends either, and i'm lost with how to use it.</p>
  
  <p>it has a special prefix (&lt;%#) and when i type anything other then the original code it's no good, but changing &lt;%# to &lt;%= or &lt;% doesn't seem to work either?</p>