Link to home
Start Free TrialLog in
Avatar of smithmrk
smithmrkFlag for United States of America

asked on

Web Server CleanUp Question

This may sound like the dumbest question...but I'm NEW to Web Developement and ASP.net.

I've recently begun creating PDF using iTextSharp and if I write to the server and then use Window.Open to display it after the user does what ever they want with it (save, print, etc.) how do I get rid of it on the server so these files don't keep building up?

I tried to display the PDF using Window.Open and then delete the file on page unload but it appears that it deletes it before displaying it, so how do I know when the user is done with the file so I can remove it from the server?

OR

If I create the file using Response.Write...how can I open the file automatically instead of displaying the dialog box that gives the user the option to Open, Save or Cancel?  I wouldn't mind using Response.Write if I could automatically open the file on completion.

Thanks,
Mark
ASKER CERTIFIED SOLUTION
Avatar of gery128
gery128
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of smithmrk

ASKER

Your first link (Stackoverflow) doesn't work...but let me review the other one and I'll get back to you.

Thanks,
Mark
Not sure which way I'm going to go, but thanks for the advice!

Mark