I am working on a project and I want to print div content.The code which I am using is fulfilling my requirements,but I am getting simple output without Css applied to it an
function printpage() {
var getpanel = document.getElementById("<%= Panel1.ClientID%>");
var MainWindow = window.open('', '', 'height=500,width=800');
MainWindow.document.write(' ');
MainWindow.document.write("");
MainWindow.document.write('');
MainWindow.document.write(getpanel.innerHTML);
MainWindow.document.write('');
MainWindow.document.close();
setTimeout(function () {
MainWindow.print();
}, 500)
return false;
}