View PDF in IE, delete back back back 2 pages
A bit new to asp.net using c #. On my site, users have the ability to view the pdf file in a browser window. The pdf data is stored in a SQL database and I am using the following code:
Byte[] bytes = (Byte[])dt.Rows[0]["ContentData"];
Response.ClearHeaders();
Response.Clear();
Response.AddHeader("Content-Type", "application/pdf");
Response.AddHeader("Content-Length", bytes.Length.ToString());
Response.AddHeader("Content-Disposition", "inline; filename=" + dt.Rows[0] ["FileName"].ToString());
Response.BinaryWrite(bytes);
Response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
The problem I only ran into in Internet Explorer is when the user clicks the Back button, it moves 2 pages. This is not critical, but it annoys users. I apologize if this was asked, but I am having trouble with searches to find the problem.
Any help is appreciated. Thank.
csnewbie
+3
csnewbie
source
to share
No one has answered this question yet
Check out similar questions:
1424
637
523
12
7
2
0
0
0
0