title: How to replace the text in a textarea by removing HTML tags on MVC EditorFor Form
body: <p>I have a field in my database called <strong>emailhtml</strong> where I save a plain text email string from a textarea called plaintext. I save the \n etc by using:</p>
  
  <pre><code>string test = plaintext.Replace(System.Environment.NewLine, "&lt;br /&gt;");
  </code></pre>
  
  <p>Now in my EditorFor form I want to be able to display the field with the include line breaks etc but I cannot seem to work out how to do so. I have tried:</p>
  
  <pre><code>@Html.TextAreaFor(c =&gt; c.Campaign.OwnHtml.Replace("&lt;br /&gt;",System.Environment.NewLine ), new {rows="20", cols="20"})
  </code></pre>
  
  <p>But this results in an <strong>InvalidOperationException:</strong></p>
  
  <p><em>Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.</em></p>