After encountering a similar situation, I discovered a solution utilizing iframes that may not be traditional ASP, but seems to be effective. You can find the article that helped me here.
An additional code update has been made:
The container page that your application calls:
<head runat="server">
<script language="javascript" type="text/javascript">
function BuildPDF() {
var iframe = document.createElement("iframe");
iframe.src = "BuildPDF.asp?" + <any arguments you require>;
iframe.style.display = "none";
document.body.appendChild(iframe);
}
function UpdateProgress(message) {
document.getElementById('txtStatus').value = message;
}
function SetDisplayFileName(fileName) {
var viewFrame = document.createElement("iframe");
viewFrame.id = "viewFrame";
viewFrame.src = "WhateverTheNameOfYourPDFViewASPPageAndArgs";
viewFrame.style.width = '100%';
viewFrame.style.height = document.documentElement.clientHeight - 20;
document.body.appendChild(viewFrame);
}
function ResizeFrame() {
var viewFrame = document.getElementById("viewFrame");
viewFrame.style.height = document.documentElement.clientHeight - 20;
}
</script>
</head>
<body onload="BuildPDF();" onresize="ResizeFrame();">
<form id="form1" runat="server">
<input type="text" id="txtStatus" style="width:80%; font-family: Tahoma, Verdana; font-size: small; font-weight: bold;" readonly="readonly" />
<br />
</form>
</body>
In your BuildPDF.asp file, include a function like the following to update the status message whenever required:
function UpdateProgress(message)
Response.Write("<script>parent.UpdateProgress('" & message & "');</script>")
Response.Flush()
end function
The referenced page in the "viewFrame" section should stream ContentType as "application/pdf." Although I implemented this in ASP.Net, there should be no hindrance in adapting it for classic ASP use.