ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Print Access database records on Button click in ASP.Net<p>Hi <a class="username" rel="ShihabKhan"> ShihabKhan</a>,</p> <p>Please follow the below steps.</p> <p>1. Read the data from access database and bind in GridView inside a ASP.Net Panel.</p> <p>For reading data from access database refer below links.</p> <h1 class="header"><a class="title f16" href="https://www.aspforums.net:443/Threads/211599/How-to-connect-MS-Access-DataBase-in-ASPNet-using-VBNet/">How to connect MS Access DataBase in ASP.Net using VB.Net</a></h1> <h1 class="header"><a class="title f16" href="https://www.aspforums.net:443/Threads/121846/jQuery-AutoComplete-TextBox-using-Microsoft-Access-Database-in-ASPNet/">jQuery AutoComplete TextBox using Microsoft Access Database in ASP.Net</a></h1> <p>2. Print ASP.Net Panel contents using JavaScript.</p> <h1 class="header"><a title="Print ASP.Net Panel contents with Print Preview using JavaScript'a" href="https://www.aspsnippets.com/Articles/Print-ASPNet-Panel-contents-with-Print-Preview-using-JavaScript.aspx">Print ASP.Net Panel contents with Print Preview using JavaScript</a></h1>https://www.aspforums.net:443/Threads/207432/Print-Access-database-records-on-Button-click-in-ASPNet/https://www.aspforums.net:443/Threads/207432/Print-Access-database-records-on-Button-click-in-ASPNet/Mon, 20 Aug 2018 00:22:00 GMTPrint Access database records on Button click in ASP.Net<p>Thanks dharmendr for helping me, you have found out the exact solution which I required, but a small problem , Although it prints the required data along with some contents like " DIV Contents&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Page 1 of 1&nbsp;&nbsp;&nbsp; <a href="http://localhost:1804/===.aspx">http://localhost:1804/===.aspx</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8/20/2018"&nbsp; which is not at all required by me, So could you please help me in removig those unneccessary contents in the print Please.</p>https://www.aspforums.net:443/Threads/207432/Print-Access-database-records-on-Button-click-in-ASPNet/https://www.aspforums.net:443/Threads/207432/Print-Access-database-records-on-Button-click-in-ASPNet/Mon, 20 Aug 2018 09:54:58 GMTPrint Access database records on Button click in ASP.Net<p>Hi <a class="username" rel="ShihabKhan"> ShihabKhan</a>,</p> <p>There are handled by user itself.</p> <p>To remove from chrome add the below line style.</p> <pre class="brush: css">&lt;style type=&#34;text/css&#34;&gt; @page { margin: 0; } &lt;/style&gt;</pre> <p>To remove from mozilla add <strong>tmoznomarginboxes mozdisallowselectionprint</strong> in the head tag.</p> <pre class="brush: js">&lt;script type="text/javascript"&gt; function PrintPanel() { var panel = document.getElementById("&lt;%=pnlContents.ClientID %&gt;"); var printWindow = window.open('', '', 'height=400,width=800'); printWindow.document.write('&lt;html moznomarginboxes mozdisallowselectionprint&gt;&lt;head&gt;&lt;title&gt;DIV Contents&lt;/title&gt;'); printWindow.document.write('&lt;/head&gt;&lt;body &gt;'); printWindow.document.write(panel.innerHTML); printWindow.document.write('&lt;/body&gt;&lt;/html&gt;'); // remove title from IE. printWindow.document.title = ''; printWindow.document.close(); setTimeout(function () { printWindow.print(); }, 500); return false; } &lt;/script&gt;</pre> <p>For IE you can not control it with javascript. You can remove only the title.</p>https://www.aspforums.net:443/Threads/207432/Print-Access-database-records-on-Button-click-in-ASPNet/https://www.aspforums.net:443/Threads/207432/Print-Access-database-records-on-Button-click-in-ASPNet/Tue, 21 Aug 2018 01:01:48 GMT