Link to home
Start Free TrialLog in
Avatar of acadenilla
acadenilla

asked on

Error opening pdf file using ie6 but it works in ie7

Hi

I have a link the shows a pdf file. It works fine in ie7 and ff but not in ie6. I can only get it to work in ie6 if i save the file first then open.

Any help would be appreciated (Code below)
Response.ClearContent();
            Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", file.Name));
            Response.AddHeader("Content-Length", file.Length.ToString());
            Response.ContentType = "application/pdf";
            Response.TransmitFile(file.FullName);
            Response.End();

Open in new window

SOLUTION
Avatar of David H.H.Lee
David H.H.Lee
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Response.Buffer = True
Response.AddHeader("content-disposition", "attachment; filename=file_long_name.pdf");
Response.ContentType = "application/ms-excel";
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial