Thursday, April 14, 2011

ASP.NET MVC RC2 template head after body?

When I installed ASP.NET MVC RC2, I noticed that the template had changed from RC1. Now, all new views have the header placeholder after the main content place holder. Why is this? It seems very illogical to me and it most definitely was not the case with RC1. I googled but couldn't find any reasoning for this change. Do you know of any?

Example:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Rules</h2>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>

Note how the placeholder with ContentPlaceHolderID of "head" is at the bottom? Weird...

From stackoverflow

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.