content is not supported outside 'script" or asp content' region

https://stackoverflow.com/questions/48915080/asp-net-content-is-not-supported-outside-the-script-or-aspcontentjavascript

https://forums.asp.net/t/1205746.aspx?content+is+not+supported+outside+script+or+asp+content+regionjava

asp.net web application有master pageweb

新增的page若是須要增長內容,須要使用asp:contentapp

<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript">
        alert("Hello, World!");
    </script>
</asp:content>

 

the required attribute contentplaceholderid is not found on content control

https://stackoverflow.com/questions/27688659/verify-content-controls-contentplaceholderid-attribute-in-the-content-pageasp.net

在master page上有對應的,兩邊的id須要匹配上ide

<asp:ContentPlaceHolder ID="cphMain" runat="server">
</asp:ContentPlaceHolder>ui

 

輸入ContentPlaceHolderID以後,會自動提示master page上有哪幾個place holder能夠用spa

相關文章
相關標籤/搜索