第三方开发人员正在为我们构建一个 kentico 站点,并且在交付给最终用户的 head 元素中有一个 asp:Literal 标签打印。标签如下,
<asp:Literal runat="server" ID="litTags" EnableViewState="false" />
这是必需的吗?它导致标记验证失败并且一些浏览器抱怨。他说这对于模板来说是必不可少的,但我在 Kentico 自己的网站或任何展示网站上都看不到任何打印模板的迹象。我可以看到该标签出现在 kentico 的模板文档中,因此我假设该标签没有被服务器正确解析。
我不是 Kentico 或 ASP 人员,我无法向他提供任何建议。有什么想法吗?
A third party developer is building a kentico site for us and there's an asp:Literal tag printing in the head element as delivered to the end user. The tag is the following,
<asp:Literal runat="server" ID="litTags" EnableViewState="false" />
Is this essential? It's causing the markup to fail validation and some browsers to complain. He says it's essential for templates, but I can't see any sign of one getting printed on Kentico's own site, or any of the showcase sites. I can see that the tag appears in kentico's templating documentation, so I'm assuming the tag just isn't getting parsed by the server correctly.
Not being a Kentico or ASP guy I can't offer him any advice. Any ideas?
发布评论
评论(1)
此标记不应传递给客户端。我认为您可能还需要 标记。
元素上的
runat="server"
属性,以便 ASP.Net 能够正确地看到文字并输出一些文本,而不是实际的This markup shouldn't be delivered to the client. I think you may need a
runat="server"
attribute on the<head>
element as well so ASP.Net will correctly see the Literal and output some text instead of the actual<asp:Literal...
markup.