I need to modify an .aspx page to include a custom toolbar. The toolbar was created as a User Control, compiled as MyCompany.Tool.dll (strongly named) and added to the GAC. I have referenced it in the .aspx page as follows:
<%@ Register Tagprefix="mycompany" Namespace="Tools" Assembly="MyCompany.Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635" %>
<%@ Import Namespace="Tools" %>
In the aspx page, it is called as follows:
<mycompany:HeaderControl ID="CreateHeader" runat="server" />
The following is automatically generated in the .aspx.designer.cs page:
protected global::Tools.HeaderControl CreateHeader;
I've added the following to the web.config file in the project:
<compilation debug="true">
<assemblies>
<add assembly="MyCompany.Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635"/>
</assemblies>
</compilation>
<pages>
<namespaces>
<add namespace="Tools" />
</namespaces>
<controls>
<add tagPrefix="mycompany" namespace="MyCompany.Tools" assembly="Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635"/>
</controls>
</pages>
When I compile, I get the following error:
The type of namespace name 'Tools' could not be found in the global namespace (are you missing an assembly reference?)
I can't figure out what I'm missing. All my searching has led to instructions indicating this is how it should be done.
<%@ Register Tagprefix="mycompany" Namespace="Tools" Assembly="MyCompany.Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635" %>
<%@ Import Namespace="Tools" %>
In the aspx page, it is called as follows:
<mycompany:HeaderControl ID="CreateHeader" runat="server" />
The following is automatically generated in the .aspx.designer.cs page:
protected global::Tools.HeaderControl CreateHeader;
I've added the following to the web.config file in the project:
<compilation debug="true">
<assemblies>
<add assembly="MyCompany.Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635"/>
</assemblies>
</compilation>
<pages>
<namespaces>
<add namespace="Tools" />
</namespaces>
<controls>
<add tagPrefix="mycompany" namespace="MyCompany.Tools" assembly="Tools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60642d8f43fa6635"/>
</controls>
</pages>
When I compile, I get the following error:
The type of namespace name 'Tools' could not be found in the global namespace (are you missing an assembly reference?)
I can't figure out what I'm missing. All my searching has led to instructions indicating this is how it should be done.