I am trying to solve this issue from last 6 hours, but couldn't complete it.
here I have one template script in my Razor view.
<script type="text/template" id="Blog_Post_Template">
{{if DescType == "FULL"}}
${FDesc}
{{/if}}
{{if DescType == "SORT"}}
${SDesc}
{{/if}}
</script>
Now, what I want is to use Razor function inside this template.
Let's take @Html.Raw(), I want to use @Html.Raw() in ${FDesc}, and ${SDesc}.
I tried many escape sequences like,
@Html.Raw("'${FDesc}'")
@Html.Raw("\'${FDesc}\'")
And mane more solutions, but I came up at the point where I started.
Input is like, A simple text with html parameters
<p> Test this </p>
Output will be a html
Appreciate, if anyone can resolve it..
@prefix.DescType? Is it a C# variable ? js variable ?