Set Response.Buffer=False then put your wait message or GIF in HTML code *before* the loop on the page. You can use DHTML to change the message when the loop is finished. Just don't use Response.Redirect after writing the HTML tag to the browser.