Error creating template from master page
Hi,
I am having a problem creating a template from a master page. Below is the error and the master page code. Any help would be much appreciated.
Cheers,
Stewart
ERROR that occurs when creating a template from the .master below
----------
Server Error in '/DemoCPG' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an
object.
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:
[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.Sitefinity.Modules.Pages.DraftProxyBase.CreateChildControls(Page page) +2299
Telerik.Sitefinity.Modules.Pages.TemplateEditorRouteHandler.ApplyLayoutsAndControls(Page page, RequestContext requestContext) +196
Telerik.Sitefinity.Web.RouteHandler.InitializeContent(Page handler, RequestContext requestContext) +475
System.Web.UI.Control.LoadRecursive() +94
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2759
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.1
MASTER Page
-------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">
<%@ Master language="C#" %>
<html dir="ltr" xmlns="www.w3.org/.../xhtml">
<head runat="server">
<title>AppPage</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
</head>
<body>
<div id="masthead">
<asp:ContentPlaceHolder id="header" runat="server"></asp:ContentPlaceHolder>
</div>
<div id="top_nav">
<asp:ContentPlaceHolder id="menu" runat="server"></asp:ContentPlaceHolder>
</div>
<div id="page_content">
<asp:ContentPlaceHolder id="content" runat="server"></asp:ContentPlaceHolder>
</div>
<div id="footer">
<asp:ContentPlaceHolder id="basemenu" runat="server"></asp:ContentPlaceHolder>
</div>
<div id="copyright">2010 © AAA Inc. All rights reserved </div>
</body>
</html>
Hi Stewart Collis,
Thank you for using our services.
Can you please make sure that you have a run-at server form tag in which your content placeholders will be inserted:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Master language="C#" %>
<
html
dir
=
"ltr"
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
>AppPage</
title
>
<
meta
content
=
"text/html; charset=utf-8"
http-equiv
=
"Content-Type"
/>
</
head
>
<
body
>
<
form
runat
=
"server"
>
<
div
id
=
"masthead"
>
<
asp:ContentPlaceHolder
id
=
"header"
runat
=
"server"
></
asp:ContentPlaceHolder
>
</
div
>
<
div
id
=
"top_nav"
>
<
asp:ContentPlaceHolder
id
=
"menu"
runat
=
"server"
></
asp:ContentPlaceHolder
>
</
div
>
<
div
id
=
"page_content"
>
<
asp:ContentPlaceHolder
id
=
"content"
runat
=
"server"
></
asp:ContentPlaceHolder
>
</
div
>
<
div
id
=
"footer"
>
<
asp:ContentPlaceHolder
id
=
"basemenu"
runat
=
"server"
></
asp:ContentPlaceHolder
>
</
div
>
<
div
id
=
"copyright"
>2010 © AAA Inc. All rights reserved </
div
>
</
form
>
</
body
>
</
html
>