Export (0) Print
Expand All

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.

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)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SaveBeforeNavigationControl : WebControl, 
	ICallbackEventHandler

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.

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

Community Additions

Show:
© 2014 Microsoft