If all you are doing is that one liner, you can add a button that doesn't post back the entire page:
<input id="Button1" type="button" value="Print" onclick="WebImageViewer1.Print();" />