Javascript function for printing DIV content from ASP.NET/PHP/ any HTML, etc.
function CallPrint(strid)
{
var prtContent = document.getElementById(strid);
window.document.write(prtContent.innerHTML);
window.document.close();
window.print();
history.back();
}
Call the javascript function as
OnClientClick="CallPrint('divPrintMessages')"
Hope this will help you....
No comments:
Post a Comment