How to make MVC 4 Razor Html.Raw work for assignment in HTML within script tags
- by Yarune
For a project I'm using jqote for templating in JavaScript and HTML generated by MVC 4 with Razor.
Please have a look at the following code in HTML and Razor:
<script id="testTemplate" type="text/html">
<p>Some html</p>
@{string id = "<%=this.Id%>";}
<!-- 1 -->
@if(true)
{
…