2

How would I get this:

<code class="language-markup">@Html.Partial("components")</code>

To output the encoded version of the HTML markup? I tried the httpUtility but it threw up a few errors.

thematt
  • 185
  • 1
  • 2
  • 15

1 Answers1

5

I think just call the encode

<code class="language-markup">
    @Html.Encode(Html.Partial("components"))
</code>
Paulo Lima
  • 1,238
  • 8
  • 8