I want to print the page on button click without opening a new tab.
I have a following lines of code that does the job for me.
function PrintDiv() {
Hi you can use below methods,
$('#PrintDiv').hide();
or
$('#PrintDiv').prop('disabled', 'true');
@media print{ #PrintDiv{ display:none !important; } }