Web Server CleanUp Question
Posted on 2012-03-23
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?
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.