ASP.net - First build fails with 'Unknown server tag'
Posted
by Sophia
on Stack Overflow
See other posts from Stack Overflow
or by Sophia
Published on 2010-03-11T06:17:40Z
Indexed on
2010/03/25
3:33 UTC
Read the original article
Hit count: 472
I have multiple custom controls used on a ASPX (and C#) page registered from within the page rather than in Web.Config.
On the first build (or rebuild), build fails with error messages for wherever I've used the custom controls. Subsequent builds are successful.
The error message:
Unknown server tag 'prefix:ExampleControl'.
What might cause this, and how can I fix it?
Register syntax:
<%@ Register Src="ControlsFolder/ExampleControl.ascx" TagName="ExampleControl" TagPrefix="prefix" %>
<!-- etc -->
Usage syntax:
<prefix:ExampleControl runat="server" ID="ExampleControl1" />
<!-- etc -->
© Stack Overflow or respective owner