To answer your question, if memory serves me correctly, when you call response.redirect execution of the current page stops and execution of the new page begins.
Personally I will not call a response.redirect while I have a database connection open, if my condition is based on a piece of data and that piece of data is found I will break out of my loop (or method) and go to my conditional statement and redirect AFTER i have closed my connections.
As an aside, even if after you called response.redirect and the ASP Process was supposed to clean up the connection for you, you should not rely on the process to clean up your connections for you because can you be 100% certain that the connection got closed? By manually closing the connection yourself you will know that the connection is closed, leaving it up to the ASP process to close the connection is bad practice and one should not get in the habit of relying on the process to do garbage collection.
"The one language all programmers understand is profanity."
|