PublishingPage.Route method (PublishingPage, String)
Routes a PublishingPage object by using the content organizer rules.
Namespace: Microsoft.SharePoint.Publishing
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Shared Function Route ( _
originalPage As PublishingPage, _
checkInComments As String _
) As PublishingPage
'Usage
Dim originalPage As PublishingPage
Dim checkInComments As String
Dim returnValue As PublishingPage
returnValue = PublishingPage.Route(originalPage, _
checkInComments)
public static PublishingPage Route(
PublishingPage originalPage,
string checkInComments
)
Parameters
originalPage
Type: Microsoft.SharePoint.Publishing.PublishingPageThe PublishingPage object to be routed.
checkInComments
Type: System.StringA string that specifies any check-in comment.
Return value
Type: Microsoft.SharePoint.Publishing.PublishingPage
The PublishingPage object after routing.
Remarks
If the RequiresRouting property of the PublishingPage object is true and the PublishingPage object matches one of the content organizer rules, then the PublishingPage object is routed to the new location based on the rule. Otherwise, the PublishingPage stays in the current location.
Regardless if the PublishingPage is routed, the RequiresRouting property is set to false and the PublishingPage is checked in after the method is called.
Examples
PublishingWeb web;
PublishingPage pageBeforeRouting;
... get PublishingWeb and PublishingPage instances
string comments = "Check in Comment";
PublishingPage pageAfterRouting = PublishingPage.Route(pageBeforeRouting, comments);