I have a master page that has two content sections like this (left some parts out):
<head runat="server">
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder runat="server" ID="HeadContent" />
</head>
<body>
<div id="content">
<div id="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</div>
</div>
</body>
In one of my .aspx pages which references this master page, I supply the content like this (left some parts out):
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<% using (Html.BeginForm("Create", "Document", FormMethod.Post))
{ %>
<p>
<%: Html.LabelFor(m => m.Title) %>
<%: Html.TextBoxFor(m => m.Title) %>
<%: Html.ValidationMessageFor(m => m.Title) %>
</p>
<p>
<input type="submit" class="t-button t-state-default" value="Create" />
</p>
<% } %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
Yet the label created by the LabelFor chunk above does not get styled. In my CSS file, I have a rule to set the font globally and this is not applying - the font is defaulting instead.
Do I need to re-include all my CSS and Javascript in the 'Content2' section in the .aspx page? Isn't it sufficient to include them once in Site.Master?