Hello, I am trying to access client template values in Razor syntax like the below. pay.ID always return "#= data.ID #" instead of value. But @id inside html return the correct value.
<script id="GridCommandTemplate" type="text/x-kendo-template">
@{
var id = "#= data.ID #"
var s = "#= data.StatusStr #";
var userid = "#= data.UserId #";
var data = ("#= data #");
object pay = new Payment() { ID = id, UserId = userid };
}
<a class="dropdown-toggle k-button k-primary" data-toggle="dropdown">
<i class="k-icon k-i-more-horizontal">@id</i>
</a>
<ul class="dropdown-menu dropdown-user">
<li>
<a href="Payment/Details?id=#= data.id#" class="dropdown-item"><i class="k-icon k-i-eye"></i> Details</a>
</li>
@if ((await AuthorizationService.AuthorizeAsync(
User, pay,
PaymentOperations.Update)).Succeeded)
{
<li class="dropdown-divider"></li>
<li>
<a href="Payment/Edit?id=#= data.id#" class="dropdown-item"><i class="k-icon k-i-edit"></i> Edit</a>
</li>
}
</ul>
</script>