title: Use DisplayFormat to show 3 decimal places
body: <p>I am a newbie to .NET.  I cannot figure out the correct syntax to show three decimal places in my view.</p>
  
  <p>In my model I currently have:</p>
  
  <pre><code>&amp;lt;&lt;Display(name:="Straight Rate")&gt;
  Public Property StraighRate() As Decimal
      Get
          Return mStraightRate
      End Get
      Set(ByVal value As Decimal)
          mStraightRate = value
      End Set
  End Property
  </code></pre>
  
  <p>I know I need to use the DisplayFormat in my model, but I cannot figure out the syntax that will make it work.</p>
  
  <p>Do I need to do anything additional in my View after I add the syntax for the DisplayFormat in my model?</p>
  
  <p>Here is what I have in my current view:</p>
  
  <pre><code>@Html.DisplayFor(Function(modelItem) currentItem.StraightRate)
  </code></pre>