加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

content is not supported outside 'script" or

发布时间:2020-12-16 06:44:11 所属栏目:asp.Net 来源:网络整理
导读: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有mas

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可以用

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读