title: How to making Display Template Work Correctly
body: <p>I am trying to learn MVC. I had a very simple requirement that I wanted to insert commas in number displayed in a table. This is what I have.</p>
  
  <p><strong>Model</strong></p>
  
  <pre><code>public partial class PACKAGE
  {
      public string PACKAGEID { get; set; }
      [UIHint("withcommas")]
      public Nullable&lt;long&gt; FILESIZE { get; set; }
  }
  </code></pre>
  
  <p><strong>Views\Shared\DisplayTemplates\withcommas.cshtml</strong></p>
  
  <pre><code>@Model withcommas
  @{
      &lt;span&gt;[@Model.ToString("#,##0")]&lt;/span&gt;
  }
  </code></pre>
  
  <p>I did want to add the sqare brackets around it.</p>
  
  <p><strong>Views\Home\Packages.cshtml</strong></p>
  
  <pre><code>@Html.DisplayFor(modelItem =&gt; item.FILESIZE)
  </code></pre>
  
  <p>What I am getting on the display is <em>"2287097 withcommas [2,287,097];"</em>
  I do not understand why the original number as well as name of the hint is showing up in addition to the formatted number. I do not understand why there is an extra semicolon at the end.</p>