Thursday, February 21, 2013

how to print and automaticay close windows in asp.net c#

in head section
=============

<script type="text/javascript" language="javascript">
function PrintControl() {
window.print();
 window.onfocus = function () { window.close(); }
}
</script>

=================
in asp.net .cs page
Page.ClientScript.RegisterStartupScript(GetType(), "MyKey", "PrintControl();", true);

No comments:

Post a Comment