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

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -