Share via


ContentEditorWebPart.ContentLink Property

Gets or sets a URL that provides content for this Web Part.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ResourcesAttribute("ContentLinkLiteral", "Advanced", "ContentLink")> _
<WebPartStorageAttribute(Storage.Shared)> _
Public Property ContentLink As String
    Get
    Set
'Usage
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; }

Property Value

Type: System.String
String URL that provides content for this Web Part

Remarks

The ContentLink property is read/write. Use this property to indicate the location from which the Web Part Page obtains the content for this Web Part. The URL can point to any Web address; however it must contain the protocols "http://" or "https://" to work properly. For example, "http://www.domain.com" or "https://www.domain.com."

If the ContentLink URL points outside of the Windows SharePoint Services Web site to a site that requires authentication, then that site must be isolated. For this situation it is recommended that you use the PageViewerWebPart instead of the ContentEditorWebPart. The PageViewerWebPart renders content within an IFrame. With IFrames, security prompting occurs on the client, enabling the target user to specify a user name and password.

Embedded content is displayed if the ContentLink fails or times out.

This property is an AllUser property (i.e., Storage.Shared).

See Also

Reference

ContentEditorWebPart Class

ContentEditorWebPart Members

Microsoft.SharePoint.WebPartPages Namespace