RazorEngine: cannot use Html.Raw

前端 未结 2 1002
慢半拍i
慢半拍i 2020-12-06 16:29

using RazorEngine outside asp.net I\'m experiencing this error when I try to write raw html by using @Html.Raw(\"html string here\"):

Una

2条回答
  •  难免孤独
    2020-12-06 16:30

    The solution has been found here: https://github.com/Antaris/RazorEngine/issues/34

    It's enough to use @(new RawString("html string here")) or @Raw("html string here") instead of @Html.Raw("html string here").

    I hope this helps! Bye

提交回复
热议问题