Print Access database records on Button click in ASP.Net

Last Reply 8 months ago By dharmendr

Posted 8 months ago

Can anybody please help in coding to print Microsoft Access Database along with some additional information in in vb on the click of a button, Please???

You are viewing reply posted by: dharmendr 8 months ago.
Posted 8 months ago

Hi ShihabKhan,

There are handled by user itself.

To remove from chrome add the below line style.

<style type="text/css">
        margin: 0;

To remove from mozilla add tmoznomarginboxes mozdisallowselectionprint in the head tag.

<script type="text/javascript">
    function PrintPanel() {
        var panel = document.getElementById("<%=pnlContents.ClientID %>");
        var printWindow ='', '', 'height=400,width=800');
        printWindow.document.write('<html moznomarginboxes mozdisallowselectionprint><head><title>DIV Contents</title>');
        printWindow.document.write('</head><body >');
        // remove title from IE.
        printWindow.document.title = '';
        setTimeout(function () {
        }, 500);
        return false;

For IE you can not control it with javascript. You can remove only the title.