Click here to Skip to main content
15,907,677 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
To open a PowerPoint file, I used the code:
System.Diagnostics.Process.Start("myFile.pptx");
It works but I lost the original aspx page. How to solve this problem? Thanks.
Posted
Comments
ZurdoDev 6-Nov-13 14:55pm    
What? That would open the PPT file on the server and you have this flagged asp.net. Everything seems wrong about this.
Sergey Alexandrovich Kryukov 6-Nov-13 14:57pm    
Totally puzzling post. Maybe OP has a plugin for on-page support of PPTX... but then it would not be a question for developer's forum...
—SA
Sergey Alexandrovich Kryukov 6-Nov-13 14:56pm    
Huh? Lost what, where? If you need help, you need to really explain your problem, instead of throwing puzzles.
—SA
[no name] 6-Nov-13 15:02pm    
Thanks for your responses. In my ASP.Net project, I opened a page (myPage.aspx). There is a click button to fire an event to open PPTX file. When the PPTX file got open, the original opened aspx on the browser was gone. Hopefully, the question has got clearly explained.
ZurdoDev 6-Nov-13 15:19pm    
No. The code you are using will open the file on the server, right? Not on the client. Use Response.Redirect or some other form of the Response Object.

I used an alternative way to solve the problem posted. My code is below:
C#
System.Diagnostics.Process.Start("myfile.pptx"); 
RegisterStartupScript("xxx", "window.open('myPage.aspx');");

Thanks.
 
Share this answer
 
Changed to:
ClientScript.RegisterStartupScript(this.GetType(), "pop", pageURL, true);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900