ContentEditorWebPart.ContentLink 属性

获取或设置为此 Web 部件提供内容的 URL。

命名空间:  Microsoft.SharePoint.WebPartPages
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
<ResourcesAttribute("ContentLinkLiteral", "Advanced", "ContentLink")> _
<WebPartStorageAttribute(Storage.Shared)> _
Public Property ContentLink As String
    Get
    Set
用法
Dim instance As ContentEditorWebPart
Dim value As String

value = instance.ContentLink

instance.ContentLink = value
[ResourcesAttribute("ContentLinkLiteral", "Advanced", "ContentLink")]
[WebPartStorageAttribute(Storage.Shared)]
public string ContentLink { get; set; }

属性值

类型:System.String
String提供用于此 Web 部件的内容的 URL

备注

ContentLink属性是可读写。使用此属性来指示从该 Web 部件页获取内容此 Web 部件的位置。URL 可以指向任何 Web 地址 ;但是,它必须包含的协议"http://"或"https://"可以正常运行。例如,"http://www.domain.com"或者"https://www.domain.com。"

如果ContentLink URL 指向外部 Windows SharePoint Services 网站的站点需要的身份验证,然后该网站必须进行隔离。这种情况下建议,而不是ContentEditorWebPart使用PageViewerWebPart 。PageViewerWebPart呈现 IFrame 中的内容。与IFrames,安全提示发生在客户端,使目标用户可以指定用户名和密码。

如果ContentLink失败或超时,则显示嵌入的内容。

此属性是AllUser属性 (即, Storage.Shared)。

另请参阅

引用

ContentEditorWebPart 类

ContentEditorWebPart 成员

Microsoft.SharePoint.WebPartPages 命名空间