SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 – Eric Alexander 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
FormEvents_Submit(null, null);
System.Web.HttpContext.Current.Response.Redirect("", 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.