Does Site.Master NEED to have a "TitleContent" ContentPlaceHolder? Can I get rid of it?

We use a wrapper that is delivered to us by our client, into which we inject all of our content.

Our master page currently looks like this:

<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>

<%= (string)ViewData["WrapperTop"] %> // wrapper is split by a <ContentWell /> tag

    <div>
        <asp:ContentPlaceHolder ID="MainContent" runat="server" />
    </div>    

<%= (string)ViewData["WrapperBottom"] %>

The issue I have with this is that

<asp:ContentPlaceHolder ID="TitleContent" runat="server" />

is redundant, because all of the page title information is contained in the wrapper that is delivered by the client. But when I try to delete that line I get the following exception:

Exception of type 'System.Web.HttpUnhandledException' was thrown.

Is there a way for me to safely get rid of that or does ASP.NET MVC need it to work?

Answers


You shouldn't need it -- I have a converted 1.0 app that doesn't have it and it works just fine. Have you made sure to remove any references to it in pages that use the Site.Master? That might be where your exception is coming from if you've removed it.


Need Your Help

VS 2010, Move constructor only reached after move() and slower than copy constructor?

c++ visual-studio-2010 visual-c++ c++11

trying to test out move semantics i build a simple class that allocates some memory:

Gradient Descent

python math matrix mathematical-optimization

So I am writing a program that handles gradient descent. Im using this method to solve equations of the form