ASP.net - First build fails with 'Unknown server tag'
- by Sophia
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 -->