Attribute “runat” is not a valid attribute. Did you mean “content” or “target”? How to solve this asp.net validation error

StackOverflow https://stackoverflow.com/questions/1802240

  •  05-07-2019
  •  | 
  •  
Was it helpful?

Solution

runat="server" is asp.net server control syntax. It must not come in html. It is interpreted by ASP.NET. you must remove this attribute.
Possible Reason for this:
1. I think the template is dynamically created. 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.

NOTE: No ASP.NET server control gives runat="server" in HTML. It is hardcoded in your code. remove this from both anchor and image tag.

OTHER TIPS

Er... remove the attributes? They aren't valid HTML, and they're only meaningful when interpreted by ASP.NET.

Your pages should not be rendered with runat="server", so something's definitely going wrong here. What does the part of your aspx look like, that corresponds to one of the elements that is giving this validation error?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top