c# - Write <% to a view in MVC2 -
i need pass template string chartjs in mvc2, template string akin to:
tooltiptemplate: <%if (value != 0){%><%= label %> - <%= value %><%}%>
how can in mvc2 view? rendering engine thinkgs <%
tags c# , tries render them.
the thing came was:
this.viewdata["hack"] = "<%if (value != 0){%><%= label %> - <%= value %><%}%>";
but looks bad.
Comments
Post a Comment