Only Content controls are allowed directly in a content page that contains Content controls in ASP.NET

Tripati Subudhi picture Tripati Subudhi · Feb 14, 2013 · Viewed 74.3k times · Source

I have an application which has a master page and child pages. My application is working fine on local host (on my intranet). But as soon as I put it on a server that is on the internet, I get the error shown below after clicking on any menus.

Only Content controls are allowed directly in a content page that contains Content controls.

screenshot

Answer

Brian Webster picture Brian Webster · Feb 14, 2013

Double and triple check your opening and closing Content tags throughout your child pages.

Confirm that they

  • are in existence
  • are spelled correctly
  • have an ID
  • have runat="server"
  • have the correct ContentPlaceHolderID