web.config file references cannot be found in intellisense

485 Views Asked by At

I have referenced multiple user controls within the web.config file, because I was receiving an error in the individual pages and they are used in multiple pages, the code I wrote is as follows:

<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add tagPrefix="IPAMControl" tagName="confirm_list" src="~/Controls/confirmed_participant_list.ascx"/>
    <add tagPrefix="IPAMControl" tagName="contact_us" src="~/Controls/contact_us.ascx" />
    <add tagPrefix="IPAMControl" tagName="erh_list" src="~/Controls/erh_list.ascx" />
    <add tagPrefix="IPAMControl" tagName="graphic_with_thumbnail" src="~/Controls/graphic_with_thumbnail.ascx" />
    <add tagPrefix="IPAMControl" tagName="header" src="~/Controls/header.ascx" />
    <add tagPrefix="IPAMControl" tagName="footer" src="~/Controls/footer.ascx" />
    <add tagPrefix="IPAMControl" tagName="main_tnavbar" src="~/Controls/main_tnavbar.ascx" />
    <add tagPrefix="IPAMControl" tagName="program_header" src="~/Controls/program_header.ascx" />
    <add tagPrefix="IPAMControl" tagName="program_list" src="~/Controls/program_list.ascx" />
    <add tagPrefix="IPAMControl" tagName="signup_section" src="~/Controls/signup_section.ascx" />
    <add tagPrefix="IPAMControl" tagName="speaker_list" src="~/Controls/speaker_list.ascx" />
    <add tagPrefix="IPAMControl" tagName="track" src="~/Controls/track.ascx" />
  </controls>
</pages>

However, when I go into the HTML markup file (aspx) and beging typing "<IPAM..." nothing appears and I get an error of "Unrecognized namespace 'IPAMControls'.

Below is a sample page I am trying to insert one of the controls into:

<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterNew.master" CodeFile="~/programs/programs.aspx.cs" Inherits="IPAM.Website.programs.programs" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="Main" Runat="Server">
    <h1>Upcoming Programs</h1>
<hr size="1">
<p align="center"><a href="#long" class="bodylink">Long Programs</a> | <a href="#workshops" class="bodylink">Workshops</a> | <a href="#affiliate" class="bodylink">Affiliates' & Other Workshops</a> | <a href="#summer" class="bodylink">Summer Programs &amp; Special Events</a>
</p>


Our upcoming programs include long programs, short programs (workshops), reunion conferences, and summer programs. Click on the program title for detailed information.
    <%--<a name="long"><ipam:program_list id="idProgramList1" Type="Long" Time="Upcoming" runat="server" /></a>
    <a name="workshops"><ipam:program_list id="idProgramList2" Type="Short" Time="Upcoming" runat="server" /></a> 
    <a name="affiliate"><ipam:program_list id="idProgramList3" Type="Affiliate" Time="Upcoming" runat="server" /></a>
    <a name="summer"><ipam:program_list id="idProgramList5" Type="Summer" Time="Upcoming" runat="server" /></a>
    <a name="special"><ipam:program_list ID="idProgramList6" Type="Special" Time="Upcoming" runat="server" /></a>--%>
</asp:Content> 

What am I doing wrong or missing.

1

There are 1 best solutions below

15
On

You use user controls like this:

<IPAMControl:confirm_list ID="<id>" runat="server"></IPAMControl:confirm_list>

I use VS2008 and it doesn't come up in my intellisense either.

[Edit]

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" 
AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="accesscontrol_test" %>
<%@ Register TagPrefix="IPAMControl" TagName="confirm_list" Src="Copy of nav.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="NEContent" Runat="Server">
<h1>Upcoming Programs</h1>
<hr size="1">
<p align="center"><a href="#long" >Long Programs</a></p>


Our upcoming programs include long programs, short programs (workshops), reunion 
conferences, and summer programs. Click on the program title for detailed information.
<a name="long"><IPAMControl:confirm_list id="idconfirm_list" runat="server">
</IPAMControl:confirm_list></a>
</asp:Content> 

The above code works fine for me, try registering it at the top of the page like I did, then we can help pinpoint what's causing the issue. You'll obviously have to change the directives, but register it in the page and not the web config.

[Edit]

Try adding this to your web config in <pages><controls>

<add tagPrefix="IMAPControl" namespace="IMAP.Webmaster.Controls" assembly="IMAP.Webmaster" />