I am using Kendo UI MVC wrappers. Is there a way to use resource files in templates?
I tried to use the following code:
<script id="person-template" type="text/x-kendo-template"> <span>${Resource.LastName} ${LastName}</span>
</script>
I've got the error: "Resource not defined".
2 Answers, 1 is accepted
0
Accepted
Atanas Korchev
Telerik team
answered on 09 Jan 2013, 08:05 AM
Hi,
This is a well-known JavaScript error which is thrown when the object you are accessing does not exist. Do you have a Resource JavaScript object? If not - you would get that error indeed.
If Resource is a server-side object you should use a server-side expression to get it:
ASPX:
<%= Resource.LastName %>
Razor:
@Resource.LastName
Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!