Larry Brister
asked on
.Net timer
I have a timer on my page that is disabled and the interval on the timer is 1000
I assume that's milliseconds?
On a click event I want to
Timer1.Enabled = True
Timer1.start()
run for 15 seconds
Timer1.Stop
Timer1.Enabled = False
I assume that's milliseconds?
On a click event I want to
Timer1.Enabled = True
Timer1.start()
run for 15 seconds
Timer1.Stop
Timer1.Enabled = False
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THis had example code and got me going.
Thanks...it's working
I have this
Protected Sub lnkFrustrated_Click(sender As Object, e As EventArgs) Handles lnkFrustrated.Click
tmrFrustrated.Interval = "19000"
imgFrustrated.Visible = True
tmrFrustrated.Enabled = True
End Sub
Private Sub tmrFrustrated_Tick(sender As Object, e As System.EventArgs) Handles tmrFrustrated.Tick
tmrFrustrated.Enabled = False
imgFrustrated.Visible = False
lblImage.Text = "Have a nice day!"
End Sub
Thanks...it's working
I have this
Protected Sub lnkFrustrated_Click(sender
tmrFrustrated.Interval = "19000"
imgFrustrated.Visible = True
tmrFrustrated.Enabled = True
End Sub
Private Sub tmrFrustrated_Tick(sender As Object, e As System.EventArgs) Handles tmrFrustrated.Tick
tmrFrustrated.Enabled = False
imgFrustrated.Visible = False
lblImage.Text = "Have a nice day!"
End Sub
on the timer elapse event handler add 1 to the integer field each time.
also check if the field equals 15, if yes then stop the timer and set .Enabled = false, and reset the integer field to 0 again.