/// <summary> /// Reads the RSS feed every time it is called. /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Event args.</param> private void myTimerElapsed(object sender, System.Timers.ElapsedEventArgs e) { ReadFromFeed.LoadStream(); WebRequest request = WebRequest.Create("http://waldo.dawsoncollege.qc.ca/0932340/cancel/default.aspx"); request.GetResponse(); }
/// <summary> /// Sets up the timer at the beginning of the application. /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Event args</param> protected void Application_Start(object sender, EventArgs e) { ReadFromFeed.LoadStream(); timer = new Timer(900000); timer.Enabled = true; timer.Elapsed += new ElapsedEventHandler(myTimerElapsed); }