Compartilhar via


PublishingPage.LocalContactImage Property

Gets or sets a URL that refers to an image that is associated with the local contact for the PublishingPage object.

Namespace:  Microsoft.SharePoint.Publishing
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

Syntax

'Declaration
Public Property LocalContactImage As String
    Get
    Set
'Usage
Dim instance As PublishingPage
Dim value As String

value = instance.LocalContactImage

instance.LocalContactImage = value
public string LocalContactImage { get; set; }

Property Value

Type: System.String
A URL that refers to an image that is associated with the local contact for the PublishingPage.

Exceptions

Exception Condition
[System.ArgumentNullException]

Indicates that the value being set was a null reference (Nothing in Visual Basic), which is not valid.

[System.UnauthorizedAccessException]

The current user does not have sufficient permissions to perform this action.

Remarks

The Contact property is the preferred property for tracking an SPUser who owns a PublishingPage. However, if no Contact is specified, then user information that is specific to the PublishingPage is provided through the LocalContactName, LocalContactEmail, and LocalContactImage properties. These values are relevant only for the given PublishingPage, and have no effect on any SPUser objects in the site.

The Contact property is mutually exclusive from the LocalContactName, LocalContactEmail, and LocalContactImage properties. Setting the LocalContactName, LocalContactEmail, or LocalContactImage property to a non-empty, non-null value clears the Contact property. Similarly, setting the Contact property to a non-null value clears the LocalContactName, LocalContactEmail, and LocalContactImage properties.

If this property value is used in HTML that will be rendered in a browser, you should encode the property value in HTML to avoid the possibility of scripting attacks.

To save changes after you set this property, call the Update method.

To set this value, the user must have both View and Edit permissions on the PublishingPage, View permissions to retrieve the page and to return its property values, and Edit permissions to change the value.

See Also

Reference

PublishingPage Class

PublishingPage Members

Microsoft.SharePoint.Publishing Namespace