[英]Asp.net link runat server w3c validator
when i run a link server side like this: 当我像这样运行链接服务器端时:
<link runat="server" id="staticCss"
href="....css?v=0" media="all" rel="stylesheet" type="text/css" />
asp.net renders it with asp.net用
<link runat="server" id="staticCss"
href="....css?v=0" media="all" rel="stylesheet" type="text/css" ><link>
and this fails the w3 validation 这将导致w3验证失败
Stray end tag link.
流浪结束标签链接。
becasuse link tag can't end with link but must end with /
因为link标签不能以link结尾,但必须以
/
结尾
How can i avoid it? 我该如何避免呢?
As far as I know, it can't be avoided. 据我所知,这是无法避免的。 These are the alternatives that you have:
这些是您可以选择的选择:
link
tag without the server processing, if you can link
标记而不进行服务器处理 literal
to spit out the markup as text: this way you are in total control of the formatting literal
将标记作为文本吐出:这样,您就可以完全控制格式 I have been struggling with .net generated html for a long time, it can be very frustrating. 我一直在努力地使用.net生成的html,这可能会非常令人沮丧。 If anyone knows of other ways to solve this I would be very interested to learn.
如果有人知道其他解决方法,我将非常有兴趣学习。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.