Open Infopath in C#

  • Thread starter Sohaib Al-Husseini
  • Start date
S

Sohaib Al-Husseini

Hi,
I am developing a webpatr that would open a certain infpath template; I used
the following code:
\\==========
System.Diagnostics.Process infopathprocess = new
System.Diagnostics.Process();
infopathprocess.StartInfo.Arguments = "c:\\ProjectServer2.xsn";
infopathprocess.StartInfo.FileName = "INFOPATH.EXE";
infopathprocess.StartInfo.CreateNoWindow = false;
infopathprocess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal;
infopathprocess.Start();
\\===========

The problem is that INFOPATH.EXE opens in the backgroud process in the Task
Manager! the infopath form itself is not opening.

Can you help me solving this problem,
Thanks
 
A

Agnihotram

infopathprocess.StartInfo.CreateNoWindow = false;
Try setting the above value to true.
 
M

Michel Bechelani

If what you want to do is open an infopath webform inside a webpart I
recommend you read the following:

http://msdn2.microsoft.com/en-us/library/ms778201.aspx

This document shows how to open an infopath form inside an ASPX page, you
only need to apply the XmlFormView Control in a webpart instead of an ASPX
page and everything sshould work fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top