在 Office365 Sharepoint 站点中编辑具有自定义母版页的页面内容

发布于 2024-11-18 13:22:03 字数 1553 浏览 5 评论 0原文

我已注册 Office 365 它提供共享点站点。

我创建了一个简单的母版页和内容页, 编辑页面内容

但是我无法从共享点设计器MasterPage.master

<%@Master language="C#"%>
<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<SharePoint:RobotsMetaTag runat="server"></SharePoint:RobotsMetaTag>
</head>
<body>
    <form id="frmMain" runat="server">
    <asp:ContentPlaceHolder ID="cphMain" runat="server">
                </asp:ContentPlaceHolder>
    </form>
</body>
</html>

default.aspx

<%@ Page Language="C#" MasterPageFile="~site/MasterPage.master" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>

<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ID="content1" runat="server" ContentPlaceHolderID="cphMain">
My custom html
</asp:Content>

I have signed up for office 365
which provides sharepoint site.

I have created a simple master page and content page,
however i'm unable to edit the content of the page from sharepoint designer

MasterPage.master

<%@Master language="C#"%>
<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<SharePoint:RobotsMetaTag runat="server"></SharePoint:RobotsMetaTag>
</head>
<body>
    <form id="frmMain" runat="server">
    <asp:ContentPlaceHolder ID="cphMain" runat="server">
                </asp:ContentPlaceHolder>
    </form>
</body>
</html>

default.aspx

<%@ Page Language="C#" MasterPageFile="~site/MasterPage.master" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>

<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ID="content1" runat="server" ContentPlaceHolderID="cphMain">
My custom html
</asp:Content>

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吃→可爱长大的 2024-11-25 13:22:03

default.master 中,删除 asp:Content 标记下的属性 xmlns:asp="asp"

In the default.master, remove the property xmlns:asp="asp" under the asp:Content tag.

铁轨上的流浪者 2024-11-25 13:22:03

显然,要么您提到 xmlns:asp="asp",然后您可以通过 Web 界面进行编辑,但不能在 SPD 中进行编辑,或者您将其删除,然后您可以在 SPD 中进行编辑,但不能通过 Web 进行编辑。

Apparently, either you mention the xmlns:asp="asp" and then you can edit through the web interface but not in SPD or you remove it and then you can edit in SPD but not through the web.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文