-
Print In ASP.NET
Ok... In ASP.NET, I need to beable to print anything thats in a Textbox. It would be great if you could give me the EXACT code. Meaning, all I would have to do, is copy paste it, and then make the Textbox and re-name it and maybe do a couple of more simple things. Basically so that your average retard(me for example) can beable to print using the code.
P.S. I have searched through the forums for print and didnt find what I was looking for.
-
I think you'll need to use Crystal Reports to print. Search for threads or articles on that and you may find what you need.
Otherwise it would be quite a job for the mentally handicapped. ;)
-
You would need to use javascript to invoke the browser's print dialog.
Code:
<script language="JavaScript">
function PrintGo(myTextAreaName)
{
if (window.print) {
text = document.form[0].myTextAreaName.value;
winId = window.open('','newwin');
with (winId.document) {
write('<body onLoad="window.focus();window.print()"><pre>'+text+'</pre><\/body>');
close();
}
}
}
</script>