Solved

ASP.net scheduling

Posted on 2013-11-14
2
215 Views
Last Modified: 2013-11-16
Hi. I am trying to schedule emails in my ASP.net website and got the following code
at http://www.codeproject.com/Articles/49996/Schedule-Email-Through-ASP-NET-or-Schedule-Tasks-U
I can see where the first procedure is but am not sure where to put the second and which
control (if any) to add to the application

' Inside Global.ascx
Private Sub Application_Start(sender As Object, e As EventArgs)
      ' Code that runs on application startup
      Dim myTimer As New System.Timers.Timer()
      ' Set the Interval to 5 seconds (5000 milliseconds).
      myTimer.Interval = 5000
      myTimer.AutoReset = True
      AddHandler myTimer.Elapsed, New ElapsedEventHandler(AddressOf myTimer_Elapsed)
      myTimer.Enabled = True
End Sub

Public Sub myTimer_Elapsed(source As Object, e As System.Timers.ElapsedEventArgs)
      ' use your mailer code
      Dim objScheduleMail As New clsScheduleMail()
      objScheduleMail.SendScheduleMail()
End Sub
0
Comment
Question by:murbro
2 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39647605
Both procedures are located inside Global.ascx.
You just need to implement your mailer class. (clsScheduleMail) in App_Code

<link removed - GaryC123>
0
 

Author Closing Comment

by:murbro
ID: 39654141
Thanks
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question