I am attempting to register my user controls within the webconfig file because I am receiving the Element does not exist error, but I am receiving the following error when I try
Get rid of the namespace attribute, as it's confusing ASP.NET as to whether you're attempting to register a User Control or a Custom Control.
User Control:
<add tagPrefix="SomeTagPrefix" src="~/Controls/SomeControl.ascx" tagName="SomeTagName"/>
Custom Control:
<add tagPrefix="SomeTagPrefix" namespace="SomeNamespace" assembly="SomeAssembly"/>
So, in your example:
<add tagPrefix="IPAMControl" tagName="track" src="~/controls/track.ascx" />
And on the ASPX/ASCX, you use it like this:
<IPAMControl:track id="ipamTrack" runat="server" />
See here for more info.
EDIT
To prove this works - i did the following:
And it all works fine.
Here is the User Control:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyUserControl.ascx.cs" Inherits="WebApplication1.Controls.MyUserControl" %>
<span>Hi, im a user control, how are you?</span>
Here is the portion of the web.config i edited:
<pages>
<controls>
<add tagPrefix="MyControls" tagName="MyUserControl" src="~/Controls/MyUserControl.ascx"/>
</controls>
</pages>
Here is the Default.aspx change i made:
<MyControls:MyUserControl id="myUserControl" runat="server" />
And the page rendered correctly.
Now, unless what i have done here is different to how you have attempting to do it, you must have other code/errors that is interfering with this.
Don't know how much else help i can be.