OnClientClick
event will be fired first, it will accept boolean value ( true by default )
if the value is true,
onclick
event will be fired, else it wont.
it should be
OnClientClick =" return PrintPage();"
however the
window.print()
method will not return any value, so its difficult to know that whether the print or cancel button is clicked.
check this, it might help you
How to capture the click event on the default print menu called by Javascript window.print()? - Stack Overflow[
^]