ASP web service timer

Associate
Joined
11 Sep 2005
Posts
1,883
Location
Southport
Hi,

I am new to ASP programming (and all web programming in general). I usually program in C/C++ or Java.

I am writing a basic database application which needs to call some method periodically to grab data from an external source (MOM product connector) and then insert it into the database. The users view this data from a webpage.

What would be the best way of doing this? Should I just have the users press a button to pull down new data into the DB and then display it? I would prefer it to be a little 'smoother' than this...

Also, I'm not totally sure on object lifecycle stuff with ASP. I have an object instance that I would have as a singleton if using Java (it is the object which manages the database, pulls down data from MOM etc), but from what I've seen each session would create a new instance. What's the best practice for this sort of thing?

Cheers!
 
1) Insert <meta http-equiv="refresh" content="## in seconds; URL=yourwebpage.asp"> in the HEAD tags of your webpage. This will auto-refresh the page ## number of seconds.

2) Lifecycle: If you're using classic ASP, then either increase the session timeouts to something bigger, or use cookies. If you're using ASP.Net, use ViewState to retain information on the page.
 
Back
Top Bottom