Visual Studio Custom Controls All stop being known elements?

I have a visual studio project with about 20 custom controls and a dozen or so aspx files to boot.
They are referenced in my web config file.
I added another custom control and soon after every custom control in my code and markup became 'X' is not a known element.
I had seen similar behaviour before in visual studio so closed the program and restarted but to no avail.  I also tried, cleaning and rebuilding.
I tried upgrading the project to a later version of Visual studio (2010 up to 2013) again no avail.
Something I noticed though, if I changed the namespace on the controls to something else the markup references changed from 'is not a known element' to 'is not registered' which suggests that the original references in the web config are being detected in some way.
Has anybody experienced something like this who might be able to offer a suggestion on how to bring the solution back into a 'buildable' state?
Who is Participating?
dgloverukAuthor Commented:
I managed to find the cause of the problem to this myself...although not how the cause came to exist.
I looked through one of the webforms I had been working with recently and noticed its class was not something I would have chosen (Criteria) and it was not named after the webform file name "RequirementSearchCriteria", in addition in the codebehind link the markup file referred to the same incorrect class name.  I hadn't done any find/replaces for the word 'criteria' or 'requirementsearch' so I do not know how this came to be incorrect and since it was in both files it doesn't suggest a keystroke slipup.
Anyway when I changed the class name back to "RequirementSearchCriteria" in both the code behind and markup the issues with my user controls not being happy went away.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.