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

jpa - Passing entitymanager from reflection method -

frame rate - JAVA simple fps animation(how can i work with?) -