ConsoleAction.RefreshCurrentItemAfterUpdate Method

Refreshes the SPListItem object that represents the current PublishingPage object.

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


Public Shared Sub RefreshCurrentItemAfterUpdate

public static void RefreshCurrentItemAfterUpdate()


Run this method at the end of a RaisePostBackEvent override in which the current SPListItem object has been updated. When the current SPListItem is updated during a postback, it is necessary to refresh the item so that the page can be displayed correctly. If this is not done, the ConsoleAction object may have succeeded, but the page may appear as though the ConsoleAction did not occur.

For example, the ConsoleAction may be to check in a page. If the current item is not refreshed, the page still appears checked out immediately after the ConsoleAction is executed, although it was actually checked in.

See Also


ConsoleAction Class

ConsoleAction Members

Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions Namespace