NewMind
05-22-2008, 02:26 AM
I get the following error when trying to display a pdf in IE 7 ONLY; it works in FireFox nd IE6.
Here is the code I used to get it working (Hope this helps someone):
[quote]
try
{
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.Buffer = false;
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "inline; filename=Report.pdf");
Response.AddHeader("Content-Length", pdf.Length.ToString());
Response.BinaryWrite(pdf); //pdf = ReportViewer report
Response.Close();
}
finally
{
Response.Close();
}</CODE>
Here is the code I used to get it working (Hope this helps someone):
[quote]
try
{
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.Buffer = false;
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "inline; filename=Report.pdf");
Response.AddHeader("Content-Length", pdf.Length.ToString());
Response.BinaryWrite(pdf); //pdf = ReportViewer report
Response.Close();
}
finally
{
Response.Close();
}</CODE>