title: Replace string in Razor View
body: <p>I would like to replace a string into Razor view and for some reason it does not work</p>
  
  <pre><code>@foreach (var item in Model)
  {
      &lt;tr&gt;
          &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.User)&lt;/td&gt;
          &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.PasswordExpired.Replace("True", "Yes"))&lt;/td&gt;
      &lt;/tr&gt;
  }
  </code></pre>
  
  <p>Property <code>PasswordExpired</code> is a <code>bool</code>.</p>
  
  <p>Any help would be appreciated.</p>