Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

A Submit event in a hosted InfoPath 2007 form always occurs first in the InfoPath form and then in the host


View products that this article applies to.

Symptoms

If you create a hosted Microsoft Office InfoPath 2007 form that uses the Submit event handler, the Submit event always occurs first in the InfoPath form and then in the host. If the code in the Submit event in InfoPath 2007 cancels the event because an error occurs, the Submit event in the host will not occur, and you may receive an error message that resembles the following:
The form cannot be submitted.

↑ Back to the top


Cause

This behavior occurs because the Submit event in the InfoPath form is canceled when the CancelableArgs.Cancel property of the SubmitEventArgs(E.CancelableArgs.Cancel) class is set to true.

Note E is a parameter of the SubmitEventArgs class.

↑ Back to the top


Keywords: KB922211, kbinfo, kbtshoot

↑ Back to the top

Article Info
Article ID : 922211
Revision : 4
Created on : 2/7/2007
Published on : 2/7/2007
Exists online : False
Views : 315