
正文
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-aspcontent
https://forums.asp.net/t/1205746.aspx?content+is+not+supported+outside+script+or+asp+content+region
asp.net web application有master page
新增的page如果需要增加内容,需要使用asp:content
<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-page
在master page上有对应的,两边的id需要匹配上
<asp:ContentPlaceHolder ID="cphMain" runat="server">
</asp:ContentPlaceHolder>
输入ContentPlaceHolderID之后,会自动提示master page上有哪几个place holder可以用






