Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7537513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:52:19+00:00 2026-05-30T06:52:19+00:00

I am trying to implement a Web User Control into one of my APSX

  • 0

I am trying to implement a Web User Control into one of my APSX pages but keep getting the following warning:

Element ‘IntFilter’ is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.

The user control is defined in the same web project as the aspx page.

Question:
How do I resolve this warning (I do not want to move the control to a separate project)?
Also, what do I need to do to enable IntelliSense for this control so I can set its FilterTypeSelection property from ASPX?

Code for “~/FilterControls/IntFilter.ascx”

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="IntFilter.ascx.vb" Inherits="StaffSupport.Filters.IntegerFilter" %>
<asp:DropDownList ID="typeFilterDropDownList" runat="server">
    <asp:ListItem Selected="True"  Text ="Any"          Value="-1" />
    <asp:ListItem Selected="False" Text ="Equal"        Value= "0" />
</asp:DropDownList><br />
<asp:TextBox ID="TextBox1" runat="server" /><asp:CheckBox ID="CheckBox1" runat="server" Text="Inclusive" /><br />
<asp:TextBox ID="TextBox2" runat="server" /><asp:CheckBox ID="CheckBox2" runat="server" Text="Inclusive" /><br />

Code for “~/FilterControls/IntFilter.ascx.vb”

Namespace Filters
    Public Class IntegerFilter
        Inherits System.Web.UI.UserControl

        Public Enum NumberFilterTypes As SByte
            Any = -1
            Equals = 0
        End Enum

        Public Property FilterTypeSelection As NumberFilterTypes
            Get
                Dim value As SByte
                If Not  Integer.TryParse(typeFilterDropDownList.SelectedValue, value) Then
                    value = -1
                End If

                Return CType(value, NumberFilterTypes)
            End Get
            Set(value As NumberFilterTypes)
                typeFilterDropDownList.SelectedValue = CSByte(value)
            End Set
        End Property

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        End Sub

    End Class
End Namespace

Code for “OpenCases.aspx”

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/StaffSite.Master" CodeBehind="OpenCases.aspx.vb" Inherits="StaffSupport.OpenCases" %>
<%@ Register TagPrefix="filters" TagName="IntFilter" src="~/FilterControls/IntFilter.ascx" %>
<asp:Content ID="bodyContent" ContentPlaceHolderID="cphBody" runat="server">
    ID<br />
    <filters:IntFilter ID="IntFilter1" runat="server" />
</asp:Content>

Code for “OpenCases.aspx.vb”

    Public Class OpenCases
        Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Page.ViewStateMode = UI.ViewStateMode.Disabled
    End Sub

Update 2012/02/21:
Fixed the “filters” vs “filter” miss match.

Also of note, if you drag the control from the Solution Explorer to the page in Design view it will add the references you need (though it was still generating the warning for me). If you drag it to the page in source view it will add an a tag with a href to the element.

Update 2012/02/21 b:
Found the solution, see my answer below.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:52:21+00:00Added an answer on May 30, 2026 at 6:52 am

    Apparently you have to reference both the ASCX page and the assembly.
    If you drag the ASCX page from the “Solution Explorer” window to the Design view for the page you are editing it will add the reference for the ASCX page, but you will have to add the assembly reference manually.

    OpenCases.aspx

    <%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/StaffSite.Master" CodeBehind="OpenCases.aspx.vb" Inherits="StaffSupport.OpenCases" %>
    <%@ Register Assembly="StaffSupport" Namespace="StaffSupport.Filters" TagPrefix="filters" %><%-- Assembly Reference --%>
    <%@ Register TagPrefix="filters" TagName="IntFilter" src="~/FilterControls/IntFilter.ascx" %>
    <asp:Content ID="bodyContent" ContentPlaceHolderID="cphBody" runat="server">
        ID<br />
        <filters:IntFilter ID="IntFilter1" runat="server" />
    </asp:Content>
    

    Note: beware of object type collisions. For example the following would also work:

    <%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/StaffSite.Master" CodeBehind="OpenCases.aspx.vb" Inherits="StaffSupport.OpenCases" %>
    <%@ Register Assembly="StaffSupport" Namespace="StaffSupport.Filters" TagPrefix="pre1" %><%-- Assembly Reference --%>
    <%@ Register TagPrefix="pre2" TagName="IntFilter" src="~/FilterControls/IntFilter.ascx" %>
    <asp:Content ID="bodyContent" ContentPlaceHolderID="cphBody" runat="server">
        ID<br />
        <pre1:IntFilter ID="IntFilter1" runat="server" />
    </asp:Content>
    

    This is why it started working for me Friday after I posted this, I had added a custom control which implemented System.Web.UI.WebControls.TextBox so I could drag and drop it from the Toolbox. Since it was in the same namespace the control added the assembly reference when it added the control to the page.

    Note: if you are referencing dll files which are contained in your project then you may need to remove the page registrations, build, then add the page registrations back. Otherwise the compiler may complain that the dll files are not in the bin.

    Update: 2013/04/18
    It appears you only need to add the assembly reference if the UserControl is not defined in the same namespace.

    • If the parrent is defined in Proj.Presentation and the UserControl is defined in Proj.Presentation then you should not need the assembly reference.
    • If the parrent is defined in Proj.Page and the UserControl is defined in Proj.Page.UserControl then you should not need the assembly reference.
    • If the parrent is defined in Proj.Page and the UserControl is defined in Proj.UserControl then you need the assembly reference.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to implement google map api into one of my web page
I'm trying to implement OpenId login for a web application. Whenever new user who
I am trying to implement OpenID as one preferred option to my next web
I'm getting started in developing web services using JAX-WS. I'm trying to implement classes
I'm trying to implement ServiceStack into my MVC3 project, and am following the tutorial
I'm trying to implement Facebook authentication into my web project. I've managed to get
I'm essentially trying to do the following on a Java/JSP-driven web site: User supplies
I'm trying to implement something like the following graphic below; where the user has
I am trying to implement the profile page for the user of the web
Ive been trying to convert my asp.net website into a web application following the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.