[英]Kendo UI Grid Template error - invalid template
# if( #:AllTemplateID# == @(ViewBag.BigTemplateID) ) {
<div class="templateItem testing" id="#:AllTemplateID#">
<img src="@(ViewBag.TemplateImageThumbURL)#:AllTemplateUrlImage#" alt="#:AllTemplateName#"/>
</div>
#} else { #
<div class="templateItem" id="#:AllTemplateID#">
<img src="@(ViewBag.TemplateImageThumbURL)#:AllTemplateUrlImage#" alt="#:AllTemplateName#"/>
</div>
#} #
It's saying I have an invalid template. 就是说我的模板无效。 Why?
为什么? I'm assuming it has something to do with the hashtags - #
我假设它与主题标签有关-#
the first line: 第一行:
# if( #:AllTemplateID# == @(ViewBag.BigTemplateID) ) {
First, there is no ending '#' at the end of the line. 首先,该行的末尾没有结尾“#”。 Second, you don't need to put hashes around variables
#:AllTemplateID#
if they are already in javascript portions of the template. 其次,如果变量
#:AllTemplateID#
已经在模板的javascript部分中,则#:AllTemplateID#
在它们周围放散列。
Try: 尝试:
# if( AllTemplateID == @(ViewBag.BigTemplateID) ) { #
-or- -要么-
# if( data.AllTemplateID == @(ViewBag.BigTemplateID) ) { #
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.