Automatically refresh page and revert url to previous page in asp
Posted on 2009-04-09
To explain I have a script ( that i was kindly helped with) that checks the connection to a database, if it's unable to connect it redirects the customer to an error page that does not require a connection. i'd like to refresh the error page say every 10 seconds, and on the refresh go back to the page where the customer previously was, thus running this procedure untill it connects.
a) Would this be the most efficent way of checking that the connection is now available, by posting back to the original page, loading that page if it fails go back to the error page and repeating the process, or by checking the connection on the error page and once it can connect then redirect the url to the customers original page?
b) I use a global.asa, would it be correct to say i need to create a session variable within that, that could grab and store the current page url, so the error page knows where to return to?
This is deeper than im used to so any help is great.