|
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 ...
|