Timer in ASP

07-30-2002, 12:37 AM
Can I use a Timer object in ASP? If yes, pls show me the code. Im working on a project in ASP that needs the Timer object just like in VB. Please help...

07-30-2002, 04:20 AM
No you cant use timer object in ASP, but if you want that the page refreshes every x seconds you can include the meta tag in the head tag of html page
meta http-equiv="Refresh" content="5"

This will refresh the page every 5 second

Hope this solves ur problem

07-30-2002, 10:04 AM
If you need to do things server side with a "timer", then META REFRESH is a good option. However, I would seriously hesitate to do something like this as it is defeating the purpose of ASP -- not to mention that it would increase server traffic and annoy the user. If you absolutely need to do things server side (for example, communicate with a database) and want to do it transparently to the user, then use something like an IFRAME.

In a Nutshell, you should make every effort to use the "timer" client side. There are many ways to do this with JavaScript.

07-30-2002, 11:30 AM
Yeah, all that Rezner said, plus...

I'm not sure what the timer is for in your app, I imagine that it would be while the client is interacting with the browser, hence it needs to be client-side. Javascript does a pretty good job of this.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum