asp.net how to print dynamic table
<p>I have this below Literal to show my dynamic table</p>

<pre><code>&lt;div id="Print"&gt;     
    &lt;asp:Literal ID="Literal1" runat="server"&gt;&lt;/asp:Literal&gt; 
&lt;/div&gt; 
</code></pre>

<p>and i place a imagebutton to print</p>

<pre><code>&lt;asp:ImageButton ID="ImageButton5" runat="server" 
ImageUrl="~/Image/Print_Icon_Design.jpg" Height="25px" 
Width="27px" style="margin-left:20px" OnClientClick="CallPrint"/&gt; 
</code></pre>

<p>and i have below code to print but it is not working can you please help</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
    function CallPrint(Print) {
        var prtContent = document.getElementById(Print);
        var WinPrint = window.open('', '', 'left=0,top=0,width=400,height=400,toolbar=0,scrollbars=0,status=0');
        WinPrint.document.write(prtContent.innerHTML);
        WinPrint.document.close();
        WinPrint.focus();
        WinPrint.print();
&lt;/script&gt;
</code></pre>
