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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -