I have three pages
page 1 :through a submit button in page 1 ...
I want to be redirected in page2 in new tab and page3 in the same tab.
Is that possible?
Page1 contains :
using (MemoryStream memoryStream = new MemoryStream())
{
document.Save(memoryStream, false);
memoryStream.Position = 0;
Session["BinaryData"] = memoryStream.ToArray();
ScriptManager.RegisterStartupScript(this, this.GetType(), "openPDF", "javascript:window.open('../../Service/Pages/Page2.aspx');", true);
Response.Redirect('../../Service/Pages/Page3.aspx');
}
page2: to be opened in a new tab
protected void Page_Load(object sender, EventArgs e)
{
if (Session["BinaryData"] != null)
{
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition", "inline; filename=" + filename);
////Write the MemoryStream to the Response.
Response.BinaryWrite((byte[])Session["BinaryData"]);
}
then page 3:
will be redirected in the same tab of page1
Thanks in advance
Sandy