[英]Attribute “runat” is not a valid attribute. Did you mean “content” or “target”? How to solve this asp.net validation error
Er... remove the attributes? 嗯...删除属性? They aren't valid HTML, and they're only meaningful when interpreted by ASP.NET. 它们不是有效的HTML,仅在由ASP.NET解释时才有意义。
runat="server" is asp.net server control syntax. runat =“ server”是asp.net服务器控件的语法。 It must not come in html. 它一定不能以html格式出现。 It is interpreted by ASP.NET. 它由ASP.NET解释。 you must remove this attribute. 您必须删除此属性。
Possible Reason for this: 可能的原因:
1. I think the template is dynamically created. 1.我认为模板是动态创建的。 the developer make static site and cut copy paste on server side to make it dynamic but use control as response.write and forgot to remove runat="server" because it must be html content in response.write. 开发人员制作了静态站点,并在服务器端剪切了复制粘贴以使其动态,但是将控件用作response.write并忘记了删除runat =“ server”,因为在response.write中它必须是html内容。
NOTE: No ASP.NET server control gives runat="server" in HTML. 注意:没有ASP.NET服务器控件在HTML中提供runat =“ server”。 It is hardcoded in your code. 它被硬编码在您的代码中。 remove this from both anchor and image tag. 从锚和图像标签中删除该标签。
Your pages should not be rendered with runat="server"
, so something's definitely going wrong here. 您的页面不应使用runat="server"
呈现,因此这里肯定存在问题。 What does the part of your aspx look like, that corresponds to one of the elements that is giving this validation error? aspx的一部分是什么样的,它与导致此验证错误的元素之一相对应?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.