Compdigitec Labs

« | Home | »

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:

Found another error

Found another error

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

The culprit of the error, Only Content controls are allowed directly in a content page that contains Content controls

And voila, fixed:

Fixed!

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 | 7 Comments »

7 Responses to “Solving “Only Content controls are allowed directly in a content page that contains Content controls””

  1. Luxury bag insert Says:
    November 5th, 2026 at 02:24

    … [Trackback]

    […] 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/ […]

  2. bolivian coke Says:
    November 6th, 2026 at 03:47

    … [Trackback]

    […] Find 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/ […]

  3. แทงบอลเกาหลี Says:
    November 8th, 2026 at 11:36

    … [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/ […]

  4. pet treats Says:
    November 10th, 2026 at 07:37

    … [Trackback]

    […] 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/ […]

  5. รับแก้บ้านทรุด Says:
    November 11th, 2026 at 23:20

    … [Trackback]

    […] 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/ […]

  6. ซื้อchatgpt ในนามบริษัท Says:
    November 16th, 2026 at 05:11

    … [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/ […]

  7. บุหรี่นอกราคาถูก Says:
    November 18th, 2026 at 07:11

    … [Trackback]

    […] Here you can find 77875 more 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/ […]

Comments