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
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
Microsoft.SharePoint.Publishing.WebControls.SaveBeforeNavigationControl
Namespace: Microsoft.SharePoint.Publishing.WebControls
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SaveBeforeNavigationControl _
Inherits WebControl _
Implements ICallbackEventHandler
'Usage
Dim instance As SaveBeforeNavigationControl
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SaveBeforeNavigationControl : WebControl,
ICallbackEventHandler
Remarks
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.