Share via


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)

Syntax

'Declaration
Public Shared Sub RefreshCurrentItemAfterUpdate
'Usage

ConsoleAction.RefreshCurrentItemAfterUpdate()
public static void RefreshCurrentItemAfterUpdate()

Remarks

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

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

See Also

Reference

ConsoleAction Class

ConsoleAction Members

Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions Namespace

ShowError