I have a master page that defines content placeholders for a header, content and footer.
The master page is formatted from with head and body. It also has a that wraps around the entire main content so that content pages do not have to add the form tag. The part that includes the content pages are like this:
<section id="header">
<asp:ContentPlaceHolder ID="placeholderHeader" runat="server">
header default
</asp:ContentPlaceHolder>
</section>
The content pages are formatted as shown for testing:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Pages/Master/MasterIndex.Master" CodeFile="~/Controllers/IndexController.cs" Inherits="MetisClient.Controllers.IndexController" %>
<asp:Content ID="ContentHeader" ClientIDMode="static" ContentPlaceHolderID="placeholderHeader" runat="server">
HEADER CONTENT
<asp:Button ID="btnTest" class="btn-submit" runat="server" Text="Button Test" OnClick="btnTest_Click" />
</asp:Content>
The problem is that the master page only seems to load one of the content pages - whichever was saved last. If I go in and ctrl+s the footer, and debug, only the footer shows, same for the others. The content pages CodeFile="" and Inherits="" to the same page controller file, instead of having one each.
Is it supposed to behave like this? What am I doing wrong?