Tony Martinez Tony Martinez - 1 month ago 7
C# Question

.NET 4.5.2 How can I implement time based events like saving a page to PDF in my website?

I'm making a .NET website that needs to save PDF versions of my webpages at certain times in the day. I've found the timer class and ways to generate PDF's of my web pages, but my question is which file in .NET do I need to modify so that my timer will run live with the website?

Answer

To put it simply put the timer code in a class file with a public method to start the timer. Then call that timer start method within the global.asax code's "Application_Start" method and it should work.

Please mark the answer if it helps. Thanks.