Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

XmlFormCancelEventArgs class

Provides data for the custom message that is displayed when canceling events raised by the form and its underlying XML document.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
public abstract class XmlFormCancelEventArgs : CancelEventArgs

The XmlFormCancelEvent object provides the Message and MessageDetails properties to specify or retrieve a custom message when canceling the Changing, Validating, Save, Merge, Submit, VersionUpgrade, and Loading events.

By default, the Message and MessageDetails properties have a a null reference (Nothing in Visual Basic) value.

  • When both values are a null reference (Nothing in Visual Basic), the default error message is displayed when an event is cancelled.

  • When both values are non-null, then the values specified for the Message and MessageDetails properties are displayed in the error message dialog box.

  • If both properties are set to the empty string, then no text is displayed in the error message dialog box.

  • The Message property can be a null reference (Nothing in Visual Basic) and the MessageDetails property can be non-null, and vice-versa. If either one of the values is non-null, then InfoPath will display the specified value. For example, if Message is a null reference (Nothing in Visual Basic), but MessageDetails has a value specified, InfoPath displays an error message dialog box with only the details section and no top-level text.

  • In the InfoPath design mode user interface, you can specify a custom message that is displayed when submitting succeeds or fails by using the Form Submit Options command on the Tools menu. If either the Message or MessageDetails properties are set in code, these values override any text specified in the InfoPath user interface.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.