asp.net内容页无法访问母版页中的html文件

asp.net内容页无法访问母版页中的html文件,asp.net,visual-studio,Asp.net,Visual Studio,我已经创建了默认的web表单并连接到masterpage中的html文件 <asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content1" ContentPlaceHolderID="MainContent1" Runat="Server"> <div id="box">

我已经创建了默认的web表单并连接到masterpage中的html文件

<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">

    </asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent1" Runat="Server">
    <div id="box">
                <p class="test">

                    <a target="_blank" href="webpage/rome/rome.aspx">
                        <img src="Images/rome.jpg" alt="">
                    </a>
                </p>

                <p>
                    In this series we are going to cover Ancient Rome.  We will cover the Roman Republic as well as the Roman Empire. Please click on the image above to load the series on Rome.
                </p>
            </div>
</asp:Content>
这很有效。 然后创建了另一个.aspx内容页,虽然默认情况下我可以访问母版页,但其他人在母版页中没有html文件。

在母版页文件MasterPage.master中检查是否有以下元素:

<asp:ContentPlaceHolder id="MainContent1"><asp:ContentPlaceHolder>
所以这里的想法是子页面上的ContentPlaceholder id属性值必须与母版页上的id匹配

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent1" Runat="Server">