Click here to Skip to main content
15,884,043 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I want to print data inside div tag with print dialogue in asp.net and c#.

Thanks
Nagaraj.J
Posted
Comments
So, what is the issue? Title says without print dialog and description says with print dialog...

 
Share this answer
 
You can achieve this using the jquery Library

jquery Library

and

Jquery Plugin

Write this....

ASP.NET
<head>
    <title>Invoice</title>
    <script src="AdminPanel/js/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.PrintArea.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#print_button").click(function () {
                $(".PrintArea").printArea();
            });
        });
     </script>
</head>
<body>
    <form id="form1" runat="server">

    
	<div class="PrintArea">
				
	
	</div>		
	
	
</form></body>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900