I am creating dynamically a PDF file. After creating I want to open the pdf file. For that I am using this code:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p = new System.Diagnostics.Process();
p.StartInfo.FileName = CreatePDF(); // method that creats my pdf and returns the full path
try
{
if (!p.Start())
Controller.Error = "Opening acrobat failed..";
}
catch(Exception ex)
{
Controller.Error = "Create PDF::" + ex.Message;
}
When executing this code, nothing happens and I don;t get any errors. What am I doing wrong?