Share via


PromotedItemCollection.AddPromotedLocation Method

Creates a promoted location and adds it to the collection.

Namespace:  Microsoft.SharePoint.Search.Extended.Administration.Keywords
Assembly:  Microsoft.SharePoint.Search.Extended.Administration (in Microsoft.SharePoint.Search.Extended.Administration.dll)

Syntax

'Declaration
Function AddPromotedLocation ( _
    uri As Uri _
) As PromotedLocation
'Usage
Dim instance As PromotedItemCollection
Dim uri As Uri
Dim returnValue As PromotedLocation

returnValue = instance.AddPromotedLocation(uri)
PromotedLocation AddPromotedLocation(
    Uri uri
)

Parameters

  • uri
    Type: System.Uri

    The URI to associate with the promoted location.

Return Value

Type: Microsoft.SharePoint.Search.Extended.Administration.Keywords.PromotedLocation
A PromotedLocation representing the added promoted location.

Exceptions

Exception Condition
ArgumentNullException

The [uri] is [null].

AdminException

The add operation.fails. An example of an add operation that will fail is adding an already existing promoted item to the collection.

See Also

Reference

PromotedItemCollection Interface

PromotedItemCollection Members

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace