asp.net <asp:Content>控件

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

cs页面无法获取ID="Content2",想在<asp:Content>控件中间添加内容,可以加一个占位符控件<asp:Literal>

结果:

<asp:Content ID="Content2" ContentPlaceHolderID="CPH_MainContent" runat="server">
    <asp:Literal ID="lNoticeContent" runat="server"></asp:Literal>
</asp:Content>
原文地址:https://www.cnblogs.com/zhyue93/p/asp_content.html