G
GaryDean
I have a page that streams PDF documents using the code pasted below. The
Page displays the documents just fine but the user is left with no action
but to hit the back button on the browser which takes him to the page that
redirected to this page where the page load event is not re-executed. It's
just a dead page.
Is there some way I can force a new browser window for this display?
How can I do this display and control the page flow?
---------------------------------------------------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
byte[] teststream = (byte[])Session["PDFStream"];
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ContentType = "Application/PDF";
HttpContext.Current.Response.BinaryWrite(teststream);
Response.End();
}
}
Page displays the documents just fine but the user is left with no action
but to hit the back button on the browser which takes him to the page that
redirected to this page where the page load event is not re-executed. It's
just a dead page.
Is there some way I can force a new browser window for this display?
How can I do this display and control the page flow?
---------------------------------------------------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
byte[] teststream = (byte[])Session["PDFStream"];
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.ContentType = "Application/PDF";
HttpContext.Current.Response.BinaryWrite(teststream);
Response.End();
}
}