Print Function By JavaScript
function PrintContent( Obj)
{
PrintWin=window.open('','PrintWin','directories=no, location=no, menubar=no, resizable=no, status=no, toolbar=no, scrollbars=no, width=10, height=10, left=1050, top=800');
PrintWin.document.write("");
PrintWin.document.write(document.getElementById(Obj.id).outerHTML);
PrintWin.location.reload();
PrintWin.print();
PrintWin.close();
}
/************* Function call ***************/
btnPrint.Attributes.Add( "OnClick", "PrintContent(" + TblPrint.ClientID + ");");
{
PrintWin=window.open('','PrintWin','directories=no, location=no, menubar=no, resizable=no, status=no, toolbar=no, scrollbars=no, width=10, height=10, left=1050, top=800');
PrintWin.document.write("");
PrintWin.document.write(document.getElementById(Obj.id).outerHTML);
PrintWin.location.reload();
PrintWin.print();
PrintWin.close();
}
/************* Function call ***************/
btnPrint.Attributes.Add( "OnClick", "PrintContent(" + TblPrint.ClientID + ");");
Comments