Share via


DocReturnEvent.ReturnStatus Property

Gets or sets a value indicating the return status of the OnLoad event and the OnSubmitRequest event.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
Property ReturnStatus As Boolean
    Get
    Set
'Usage
Dim instance As DocReturnEvent
Dim value As Boolean

value = instance.ReturnStatus

instance.ReturnStatus = value
bool ReturnStatus { get; set; }

Property Value

Type: System.Boolean

Remarks

If the ReturnStatus property is set to false, the OnLoad and OnSubmitRequest events fail. If set to true, the OnLoad and OnSubmitRequest events are successful. The default value for the OnLoad event is true, and the default value for the OnSubmitRequest event is false.

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Examples

In the following example, the ReturnStatus property of the DocReturnEventObject object is used to indicate that the OnLoad event was not successful:

[InfoPathEventHandler(EventType=InfoPathEventType.OnLoad)]
public void OnLoad(DocReturnEvent e)
{ 
 // Cancel the event.
 e.ReturnStatus = false;
}

See Also

Reference

DocReturnEvent Interface

DocReturnEvent Members

Microsoft.Office.Interop.InfoPath.SemiTrust Namespace