新MVC项目的主页错误

时间:2008-12-02 08:58:16

标签: asp.net asp.net-mvc

我刚刚创建了一个新的MVC项目,并且根本没有做任何更改,但是当我尝试在设计模式下查看ChangePasswordSuccess视图时,我收到错误:

The page has controls that require a Master Page reference, but none is supplied.

除了内容控件和文字文本之外,页面没有任何控件,并且它具有母版页引用。有谁知道怎么了?

<%@Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="ChangePasswordSuccess.aspx.cs" Inherits="BasicMvcApp.Views.Account.ChangePasswordSuccess" %>

<asp:Content ID="changePasswordSuccessContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Change Password</h2>
    <p>
        Your password has been changed successfully.
    </p>
</asp:Content>

1 个答案:

答案 0 :(得分:3)

提出要求后不久就注意到了。默认的ChangePasswordSuccess视图的Page指令缺少单词Page