Skip to content

How to print values diplayed on a web page

Edward Munya

Asked Nov 29, 2012, 7:11 PM EST3 answers
Share
LinkedInX
I have a web page with some values displayed on it in textboxes and datagrids. 
How can I print those values?

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Vithal Wadje
    0
    first clear which type of print you want hard copy through printer or wanted to display data in grid
    0
  • 0
    I want hard copy through printer
    0
  • Vithal Wadje
    0
    create one javascript fuction in web page,place html button on top or anywhere as want with name print and call javascript function  on html button it wiil show list of printer installed on sysetm then just choose printer and print it, the whole code will be look like as follows 

    <head runat="server">
    <script type ="text/javascript">

        
           
            window.print();
      

    </script>
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
       
           <input type ="button"  onclick=" window.print()"   value="Print"/>
       
        </form>
    </body>
    </html>
    0