I'm trying to submit my Infopath form by calling this.Submit() method from my button click event handler. According to Microsoft -
You can write a custom submit event handler for the Submit event, and then you can programmatically call the event handler by using the Submit method.
This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser.
Its not working for me and throws this exception -
XmlForm.Submit cannot be called from the SubmitEventHandler.
BTW - I'm able to submit same form without any problem if I don't use this "Submit()" method. I really want to know why its behaving like this. Looks like a BUG.
View Complete Post