SaveBeforeNavigationControl class

Placing this control on a Publishing page triggers saving the publishing page when that page is in Edit mode and the user attempts to navigate to another page.

Inheritance hierarchy


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


<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SaveBeforeNavigationControl _
    Inherits WebControl _
    Implements ICallbackEventHandler
Dim instance As SaveBeforeNavigationControl
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SaveBeforeNavigationControl : WebControl, 


This control prevents data loss on publishing pages. When a page is in edit mode, and a user navigates to another page without executing __doPostback, this control automates the save process before the page is exited (using Internet Explorer's onBeforeUnload event). This can occur when a user clicks a link or closes the browser. This control is included by default on Publishing pages.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also


SaveBeforeNavigationControl members

Microsoft.SharePoint.Publishing.WebControls namespace