0

I'm using ASP.NET Core 2.2, razor pages. I have a database field called EmailSignatureHTML that stores the HTML version of the user's email signature.

I have textarea in which I want to display that signature like this:

Thanks,

Tyrion Lannister
Hand of the King

Using the razor tag helper this is what I have...

<textarea asp-for="@Model.EmailSettings.EmailSignatureHTML" class="form-control mb-2" cols="30" rows="10" disabled="disabled"></textarea>

Problem is that it displays the signature in the text area with the HTML markup like this:

<div><b>Thanks,</b></div><div><b><br></b></div><div><b>Tyrion Lannister<br><i>Hand of the King</i></b></div><div><b><br></b></div><div><br></div>

Not sure how to fix this?

Jason
  • 93
  • 1
  • 8

0 Answers0