|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
SaveCancelEventArgs Class (Microsoft.Office.InfoPath)
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
The SaveCancelEventArgs class provides the CloseIfSaveCancelled property for determining whether to override the default behavior and allow InfoPath to close if saving a dirty form (a new or changed form that hasn't been saved) failed during the Save event.
The SaveCancelEventArgs class also provides the Cancel property inherited from the CancelEventArgs class that can be used to cancel the Save event, and the Message and MessageDetails properties inherited from the XmlFormCancelEventArgs class for providing a custom error message when the Save event is cancelled.