Asp.net mvc 4 在x-kendo-template中使用Razor查询
我试图使用一个条件Razor查询来确定是否在剑道模板中包含一个额外的行。我查询的值是模板的一部分。问题是如何在razor代码中使用剑道模板变量Asp.net mvc 4 在x-kendo-template中使用Razor查询,asp.net-mvc-4,razor,kendo-asp.net-mvc,Asp.net Mvc 4,Razor,Kendo Asp.net Mvc,我试图使用一个条件Razor查询来确定是否在剑道模板中包含一个额外的行。我查询的值是模板的一部分。问题是如何在razor代码中使用剑道模板变量 <script type="text/x-kendo-template" id="StatusTip"> <div class="tooltipcontent"> <table> <tr> <td> some row </td>
<script type="text/x-kendo-template" id="StatusTip">
<div class="tooltipcontent">
<table>
<tr>
<td> some row </td>
<td> #= SystemStatus # </td>
</tr>.
@if (SystemStatus == 1)
{
<tr>
<td> Some row</td>
<td> some row </td>
</tr>
}
</table>
</div>
</script>
Razor语法(如果不需要)。散列标记可用于封装脚本块
<script type="text/x-kendo-template" id="StatusTip">
<div class="tooltipcontent">
<table>
<tr>
<td> some row </td>
<td> #= SystemStatus # </td>
</tr>.
#if (SystemStatus == 1){#
<tr>
<td> Some row</td>
<td> some row </td>
</tr>
#}#
</table>