Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

.Net question about timers

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
Home » Discuss » DU Groups » Computers & Internet » Website, DB, & Software Developers Group Donate to DU
 
welshTerrier2 Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Jan-26-05 02:59 PM
Original message
.Net question about timers
Edited on Wed Jan-26-05 03:50 PM by welshTerrier2
i'm building an ASP.Net app using Visual Studio.Net ...

i dragged a timer "component" onto my form ... for simplicity, let's say all i'm trying to do is change the text value of a label on the form when the timer "elapses" ...

for example, let's say label1 starts with a default value of "timer has not fired yet" and when the timer interval passes, i want to change label1.text to "timer has fired" ...

here's the problem: if i set a breakpoint in my timer elapsed routine, i can see that the timer is firing and i can also see that my code to reassign the label value runs ...

HOWEVER, it seems like the page is not "reloading" in the browser ... the original label value is still showing, not the updated value ...

if i let the code run, it just keeps running the timer routine over and over but never seems to access the postback section in the form_load routine ...

Any ideas ??

Here's all the code i've written ... am i missing something ??

Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Label1.Text = "timer has fired"
End Sub

btw, the actual goal of the application is to show a sequence of photos (like an automated slide show) ... when the timer fires, i was going to update the image control to the next photo in the sequence ...

on edit: is this supposed to work in ASP.NET or just in windows apps ??

thanks for any help you can offer ...
Refresh | 0 Recommendations Printer Friendly | Permalink | Reply | Top

Home » Discuss » DU Groups » Computers & Internet » Website, DB, & Software Developers Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC