Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Timer on ASP.NET

0 views
Skip to first unread message

Emmanuel Soheyli

unread,
Dec 19, 2001, 7:04:16 PM12/19/01
to
In an Asp.net page I'm trying to use Timer control to update a label, and
few others controls every 10 seconds. The timer works fine, but it doesn't
update controls. I tried the same thing with a button, and it's working
correctly. How can I use the timer to update, or change values on other
controls. Any help would be greatly appreciate.


Tom

unread,
Dec 19, 2001, 8:46:32 PM12/19/01
to
If you want the labels to be updated on the client, then you need to use
client-side script (js or vbs). The .NET timer class only works on the
server.

--Tom

"Emmanuel Soheyli" <Emmanuel...@hotmail.com> wrote in message
news:OQSFmnOiBHA.2548@tkmsftngp03...

Emmanuel Soheyli

unread,
Dec 20, 2001, 5:18:05 PM12/20/01
to
Tom,
Thank you for the tip, but Actually it's an image control that I'd like to
update its URL every 10 seconds with the value o a field in a DataTable. How
can I simulate a Button Click? because in Clicking Action of the button I am
aible to change all contol values.
"Tom" <tka...@hotmail.com> wrote in message
news:ON5vliPiBHA.1896@tkmsftngp05...

Tom

unread,
Dec 20, 2001, 6:28:09 PM12/20/01
to
The button click requires a round-trip to the server (on your local machine,
you may not notice the page reload, but a remote user definitely would).
You could use a javascript timer to force periodic reloads but that would
quickly annnoy users.

You could send all the possible URL's to the client in a javascript (js)
array and then use a js timer to change the image src attribute.

--Tom


"Emmanuel Soheyli" <Emmanuel...@hotmail.com> wrote in message

news:eQ6R7QaiBHA.2000@tkmsftngp04...

0 new messages