Here’s the warning I received when I added <asp:PlaceHolder runat="server"> control in one of my .aspx page. I wonder if there’d be any potential problems if I just ignore it.
Element ‘PlaceHolder’ is not a known element. This can occur if
there’s a compilation error in the website, or the web.config file is
missing.
I placed <asp:PlaceHolder runat="server"> control within <head></head> HTML block and the code looked something like below.
<asp:PlaceHolder runat="server">
<%
if (condition == met)
Response.Write("<script type='text/javascript' src='" + ResolveClientUrl("~/a.js") "'></script>");
else
Response.Write("<script type='text/javascript' src='" + ResolveClientUrl("~/b.js") "'></script>");
%>
</asp:PlaceHolder>
So is it safe to ignore the warning? Any suggestions or ideas? Thanks.
According to this forum, Visual Studio is doing that because you placed the control inside the head. It appears like it is safe to do it that way though.