PRINT WATEVER YOU WANT IN A DIV, ON A BUTTON CLICK.
Aaron says “Create a div around the content you want to print”.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ButtonPrint.Attributes.Add(“onclick”, “javascript:CallPrint(‘divPrint’);”)
end sub
<script language=”javascript”>
function CallPrint(strid) {
var prtContent = document.getElementById(strid);
var strOldOne = prtContent.innerHTML;
var WinPrint = window.open(”, ”, ‘left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status=0′);
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
prtContent.innerHTML = strOldOne;
}
</script>
Strid should be the ID of the DIV.
Dont forget runat=”Server”






