Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Problem With.net Masterpages


  • Please log in to reply
2 replies to this topic

#1 scouseflip

scouseflip

    HR 4

  • Active Members
  • PipPipPipPip
  • 205 posts
  • Location:North West, England

Posted 13 May 2009 - 04:22 PM

Got a strange problem with a site I have developed on my laptop that I'm trying to deploy to the live domain...

I'm using visual studio 2005 and I'm loading the remote site and choosing 'add existing item' to upload the content. setting default as the start page and comiling.

Getting an error saying

CODE
Server Error in '/' Application.
--------------------------------------------------------------------------------

Cannot find ContentPlaceHolder 'cphMid' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Cannot find ContentPlaceHolder 'cphMid' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[HttpException (0x80004005): Cannot find ContentPlaceHolder 'cphMid' in the master page '/MasterPage.master', verify content control's ContentPlaceHolderID attribute in the content page.]
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +814
   System.Web.UI.Page.get_Master() +48
   System.Web.UI.Page.ApplyMasterPage() +18
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +685




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433


But quite clearly the mater page has the code

CODE
<asp:contentplaceholder id="cphMid" runat="server">
</asp:contentplaceholder>


and the content page has

CODE
<asp:Content ID="Content1" ContentPlaceHolderID="cphMid" Runat="Server">
[my page content here]
</asp:Content>


Anyone encountered this before??

Thanks

#2 scouseflip

scouseflip

    HR 4

  • Active Members
  • PipPipPipPip
  • 205 posts
  • Location:North West, England

Posted 13 May 2009 - 04:33 PM

Sorry, I'm an idiot - I had left the reference to the masterpage as ~/ but its no longer at root level...

poster_oops.gif embarrassed.gif

#3 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 13 May 2009 - 04:35 PM

Sounds like something I'd do. giggle.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
 
No new posts or registrations allowed.