I'm trying to upgrade from v8 to v9 at the moment.. since they're using master pages, i figured i'd take the opportunity to extend this functionality and create some master pages of my own... put header in its own page, footer in its own, etc.
Problem is the content is not getting placed into the placeholders i've created.. the only placeholder that works is the mandatory "PageContent" one.
Is there a reason for this?
In my code below, plcMainContent shows the default value, but PageContent shows the page content as expected:
C#/VB.NET Code:
<%@ Master Language="C#" AutoEventWireup="true" Inherits="AspDotNetStorefront.MasterPageBase" %>
<%@ Register TagPrefix="aspdnsfc" Namespace="AspDotNetStorefrontControls" Assembly="AspDotNetStorefrontControls" %>
<%@ Register TagPrefix="uc" TagName="Head" Src="Template_Head.ascx" %>
<%@ Register TagPrefix="uc" TagName="Body" Src="Template_Body.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<uc:Head runat="server" ID="ucHeadControl" />
</head>
<body>
<asp:ContentPlaceHolder ID="plcMainContent" runat="server">
<h3>Default Content</h3>
</asp:ContentPlaceHolder>
<div id="content">
<!-- CONTENTS START -->
<asp:ContentPlaceHolder ID="PageContent" runat="server"></asp:ContentPlaceHolder>
<!-- CONTENTS END -->
</div>
<%--<uc:Body runat="server" ID="ucBodyControl" /> --%>
</body>
</html>
My code for PlcMainContent is as follows:
C#/VB.NET Code:
<%@ Master Language="C#" AutoEventWireup="true" MasterPageFile="~/App_Templates/Skin_1/template.master" %>
<asp:Content ID="conMainBody" runat="server" ContentPlaceHolderID="plcMainContent">
<h3>Inherited Content :) </h3>
</asp:Content>
Any suggestions? Is this workable or am i wasting my time?
Thanks
Greg