how to I call the following javascript in c# linkbutton_click event. This following code is on the aspx page and I want to call this from the codebehind
<script type="text/javascript">
function PrintPanel() {
var panel = document.getElementById("<%=pnlContents.ClientID %>");
var printWindow = window.open('', '', 'height=1000,width=900');
printWindow.document.write('<html><head>');
printWindow.document.write('</head><body >');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
return false;
}
</script>