Replace underscores in enum with spaces in DisplayFor helper
<p>I have an enum OType as:</p>

<pre><code>public enum OType
    {
        First_enum_option,
        Second_enum_option,
        None_of_the_above
    }
</code></pre>

<p>My model has an enum field EType of this type, which is displayed in the view as:</p>

<pre><code>@Html.DisplayFor(x =&gt; x.EType)
</code></pre>

<p>In the view, the option is displayed correctly. But I want to replace underscores with spaces. With normal strings, I usually do this with <code>Replace("_", " ")</code> </p>

<p>If I use: <code>@Html.DisplayFor(x =&gt; x.EType.ToString().Replace("_", " "))</code>, I get this System.InvalidOperationException with message:</p>

<blockquote>
  <p>Templates can be used only with field access, property access, single-dimension >array index, or single-parameter custom indexer expressions.</p>
</blockquote>

<p>I have thought of this solution:</p>

<pre><code>&lt;td&gt;
    @{ 
         string str = item.EType.ToString().Replace("_", " ");
     }

    @str
&lt;/td&gt;
</code></pre>

<p>This solves the problem. Is there any concise and elegant way to achieve this?</p>