title: Print Multiple panels using javascript in asp.net c#
body: <p>I have 3 panels in my page, I want each panel to be printed in different page, not in the same page.(I meant Panel 1 in page 1 &amp; panel 2 in page 2 &amp; panel 3 in page 3).
  what happened now is that the first panel is printed and panel 2 is printed in the same page.
  How can I print each one in different seperated page?</p>
  
  <p>Here is the JavaScript code:</p>
  
  <pre><code> &lt;script type = "text/javascript"&gt;
  
         function PrintPanel() {
  
             var panel = document.getElementById("&lt;%=Panel1.ClientID %&gt;");
             var panel2 = document.getElementById("&lt;%=Panel2.ClientID %&gt;");
             var panel3 = document.getElementById("&lt;%=Panel3.ClientID %&gt;");
  
  
             var printWindow = window.open('', '', 'scrollbars=yes,     resizable=yes, width=800, height=500');
  
            printWindow.document.write('&lt;html&gt;&lt;head&gt;&lt;title&gt;My Title&lt;/title&gt;');
  
          printWindow.document.write('&lt;/head&gt;&lt;body &gt;');
  
          printWindow.document.write(panel.innerHTML);
          printWindow.document.write(panel2.innerHTML);
          printWindow.document.write(panel3.innerHTML);             
          printWindow.document.write('&lt;/body&gt;&lt;/html&gt;');
  
          printWindow.document.close();
  
          setTimeout(function () {
  
              printWindow.print();
  
          }, 500);
  
            return false;
  
      }
  
  &lt;/script&gt;
  </code></pre>