다음을 통해 공유


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 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

Reference

ConsoleAction Class

ConsoleAction Members

Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions Namespace

ShowError