Click here to Skip to main content
16,020,313 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
I'm currently receiving an error that reads:
Element 'X' is not a know element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.

I should note that this is happening within a webform I've added which also has a default masterpage. The file type is .aspx the code below shows how I've configured the web form excluding the actual content.

VB
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="SearchPage.aspx.cs"
     Inherits="Project.Search_Page.SearchPage" %>

<%@ MasterType VirtualPath="~/Default.master" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolkit" %>
<%@ Register Src="~/Controls/InfoMessage.ascx" TagName="InfoMsg" TagPrefix="CustCntl" %>
<%@ Register Src="~/Controls/ContentBox.ascx" TagName="ContentBox" TagPrefix="CustCntl" %>
<%@ Register Src="~/Controls/ModalBox.ascx" TagName="ModalBox" TagPrefix="CustCntl" %>
<%@ Register Src="~/Controls/GridViewHeader.ascx" TagName="GVHeader" TagPrefix="CustCntl" %>
<%@ Register Assembly="Custom.Web.UI" Namespace="Custom.Web.UI" TagPrefix="Custom" %>


I don't know what is causing this issue because I have the exact same code, at least from MasterType VirtualPath = "~/Default..... down to everything below. I've also checked my web config file and didn't find any issues there.

Any ideas on how to approach/fix this error?
Posted
Comments
Andy Lanng 22-Jul-15 10:44am    
First off you need to know where the problem is.
1: Create a blank page
2: check it works (sounds silly but I always check the blank page!)
3: register one of the controls from the erring page
4: check it works

repeat steps 3 & 4 until it errors. If it doesn't (or the blank page errors) then your issue is elsewhere.
Member 11820531 22-Jul-15 11:16am    
Thanks you, that way approaching this issue has helped!
ZurdoDev 22-Jul-15 11:20am    
1. Reply to the comment so that the user is notified.
2. What is the exact error? It will tell you exactly what the issue is.
Sreekanth Mothukuru 25-Jul-15 2:15am    
I'm quite sure the 'X' must be his control tag prefix 'CustCntl'!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900