« Android codec benchmarks | Home | Updated tktreecontrol deb package for Ubuntu/Debian »
Solving “Only Content controls are allowed directly in a content page that contains Content controls”
By admin | February 3, 2012
While debugging and creating a new ASP.NET User Control, I stumbled across the following error, “Only Content controls are allowed directly in a content page that contains Content controls” that I did not encounter before. The culprit: an invalid assembly in the custom ASP.NET User Control registration section of “web.config“:
The first thing I tried, is, of course, to follow the advice on the can and remove any tag or text other than “<asp:Content>” tags from the page. But as, you can see, there are no other characters or tags on the page, and I had tried many times to regenerate the page or force VS to “re-parse” the page without success.
After some more debugging for a while, I found this error, which was related to an invalid assembly in the registering custom ASP.NET User Controls section of the web.config document:
And the answer? It turns out it was easy enough to fix after all, just fix the offending assembly reference!

The culprit of the error, Only Content controls are allowed directly in a content page that contains Content controls
And voila, fixed:
If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: Windows | 22 Comments »
February 15th, 2022 at 00:27
… [Trackback]
[…] There you will find 14900 additional Information on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
February 23rd, 2022 at 14:03
… [Trackback]
[…] Find More on to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
May 5th, 2022 at 10:41
… [Trackback]
[…] Find More here on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
June 2nd, 2022 at 17:49
… [Trackback]
[…] Here you can find 95085 more Info on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
June 22nd, 2022 at 08:24
… [Trackback]
[…] Read More on to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
June 28th, 2022 at 06:09
… [Trackback]
[…] Find More Info here on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
June 30th, 2022 at 07:22
… [Trackback]
[…] Info on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
July 8th, 2022 at 04:56
… [Trackback]
[…] Info on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
July 22nd, 2022 at 13:40
… [Trackback]
[…] Read More to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
August 9th, 2022 at 18:19
… [Trackback]
[…] Find More on to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
August 10th, 2022 at 19:32
… [Trackback]
[…] Read More here to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
August 29th, 2022 at 08:41
… [Trackback]
[…] Here you can find 88430 additional Info to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
August 30th, 2022 at 19:01
… [Trackback]
[…] Read More here on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
September 5th, 2022 at 21:07
… [Trackback]
[…] Read More here on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
September 10th, 2022 at 16:43
… [Trackback]
[…] Here you can find 34740 additional Information to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
September 17th, 2022 at 19:45
… [Trackback]
[…] Find More Information here to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
December 1st, 2022 at 18:55
… [Trackback]
[…] Here you will find 76353 more Information to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
December 12th, 2022 at 11:34
… [Trackback]
[…] Read More on on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
December 23rd, 2022 at 02:33
… [Trackback]
[…] Read More on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
January 14th, 2023 at 05:10
… [Trackback]
[…] Read More on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
February 18th, 2023 at 05:12
… [Trackback]
[…] Find More here to that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]
March 13th, 2023 at 21:03
… [Trackback]
[…] There you will find 86448 more Info on that Topic: compdigitec.com/labs/2012/02/03/solving-only-content-controls-are-allowed-directly-in-a-content-page-that-contains-content-controls/ […]