title: Can we call 2 times response.redirect to open different page with different url?
body: <p>i am developing c# program and about to display 2 reports (crystal report) in 2 tabs. for this i tried response.redirect, but it only works for the first response.redirect. it is not going to the second response.redirect...does anyone know how to work around this issue? here goes my codes:</p>
  
  <pre><code>                    if (Request.QueryString["ProcessName"].ToString().Equals("MyBill"))
                  {
                      using (SqlCommand cmd = new SqlCommand("MyBill", con))
                      {
                          cmd.CommandType = CommandType.StoredProcedure;
  
                          cmd.CommandTimeout = 6000;
                          cmd.Parameters.Add("@id", SqlDbType.Int);
                          cmd.Parameters["@id"].Value = Request.QueryString["id"];
  
                          cmd.Parameters.Add("@billamount", SqlDbType.Int);
                          cmd.Parameters["@billamount"].Value = Request.QueryString["billamount"];
  
                          cmd.Parameters.Add("@p_displaydocno", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output;
                          cmd.Parameters.Add("@p_billno_out", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output;
  
                          con.Open();
                          cmd.ExecuteNonQuery();
  
                          //Print Bill
                          string ReportName = "Bill_New.rpt";
                          string billid = null;
  
                          string piping = Convert.ToString(cmd.Parameters["@p_billno_out"].Value);
                          string audit_no = string.Empty;
  
                          string[] strArr = null;
                          char[] splitchar = { '|' };
                          strArr = piping.Split(splitchar);
                          audit_no = strArr[0].Trim();
                          billid = strArr[1].Trim();
                          auditno = Convert.ToInt32(audit_no);
  
                          string URL = "./Reports/Reports.aspx?ReportName=" + ReportName +  "&amp;billid=" + billid;
                          Response.Redirect(URL);
  
                          //Print Receipt
                          string ReportName2 = "Receipt.rpt";
                          string DocNoFrom = null;
                          string DocNoTo = null;
  
                          DocNoFrom = Convert.ToString(cmd.Parameters["@p_displaydocno"].Value);
                          DocNoTo = Convert.ToString(cmd.Parameters["@p_displaydocno"].Value);
  
                          string URL2 = "./Reports/Reports.aspx?ReportName=" + ReportName2 + "&amp;DocNoFrom=" + DocNoFrom + "&amp;DocNoTo=" + DocNoTo;
                          Response.Redirect(URL2);
  
                          Cursor.Current = Cursors.AppStarting;
                      }
  
                      con.Close();
                  }
  </code></pre>
  
  <p>Edited: then i tried javascript to replace response.redirect, yes it opens 2 tabs but got this error</p>
  
  <pre><code>Response.Write("&lt;script&gt;window.open(URL, '_blank');&lt;/script&gt;");
  Response.Write("&lt;script&gt;window.open(URL2, '_blank');&lt;/script&gt;");
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UUL9C.png" rel="nofollow noreferrer">error 1</a>
  <a href="https://i.stack.imgur.com/x4BL9.png" rel="nofollow noreferrer">error 2</a></p>