J
Jay Douglas
Hello all,
I have a asp.net page that creates a pdf on the fly and sends the pdf
down to the browser. When calling the page up in IE the Page_Load event is
fried twice. This doesn't happen with mozilla, just IE. This is a big
problem because the PDF can be 20+ MB in size and is causing some serious
performance issues. Writing the PDF to the filesystem then a redirect is
not an option. I was wondering if anybody has any input on how to correct
the issue or when MS is going to be able to fix this bug. The
Autoeventwireup is set to false. (I've also trited using Reponse.End() and
Response.Flush() )
Here is the code for the Page_Load event:
int docId;
ErezDoc doc;
byte[] b;
if (Request.Params["d"] != null)
{
if((docId = Convert.ToInt32(Request.Params["d"])) > 0)
{
doc = new ErezDoc(docId);
b = doc.GetData();
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", b.Length.ToString());
Response.AddHeader("content-disposition", "inline; filename=" +
doc.DocId.ToString() + ".PDF");
Response.BinaryWrite(b);
doc.Clear();
}
}
I have a asp.net page that creates a pdf on the fly and sends the pdf
down to the browser. When calling the page up in IE the Page_Load event is
fried twice. This doesn't happen with mozilla, just IE. This is a big
problem because the PDF can be 20+ MB in size and is causing some serious
performance issues. Writing the PDF to the filesystem then a redirect is
not an option. I was wondering if anybody has any input on how to correct
the issue or when MS is going to be able to fix this bug. The
Autoeventwireup is set to false. (I've also trited using Reponse.End() and
Response.Flush() )
Here is the code for the Page_Load event:
int docId;
ErezDoc doc;
byte[] b;
if (Request.Params["d"] != null)
{
if((docId = Convert.ToInt32(Request.Params["d"])) > 0)
{
doc = new ErezDoc(docId);
b = doc.GetData();
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", b.Length.ToString());
Response.AddHeader("content-disposition", "inline; filename=" +
doc.DocId.ToString() + ".PDF");
Response.BinaryWrite(b);
doc.Clear();
}
}