Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to close an InfoPath form displayed in Forms Services via C#? I know I can close the form, but the actual InfoPath frame is still there.

Is there anyway to kill the process from within the form code itself, or is this impossible?

share|improve this question
possible duplicate of C# save/submit to sharepoint from infopath –  PirateEric Aug 5 '11 at 12:44
sorry, they were two seperate issues I am having. Did not mean to duplicate. –  Batman Aug 5 '11 at 15:25
Have you tried using Application.Quit()? –  user5649 Nov 15 '11 at 10:56

1 Answer 1

FormEvents_Submit(null, null);
System.Web.HttpContext.Current.Response.Redirect("http://yoursite.com", false);
share|improve this answer
That doesn't seem to work. System.Web.HttpContext isn't in by binaries. Also, wouldn't this just open another web page? –  Batman Aug 8 '11 at 14:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.