Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PRINTING FROM AN ASP !!! URGENT

Status
Not open for further replies.

yogesh

Programmer
Jun 22, 2000
14
0
0
US
GUYS PLS TELL ME HOW U CAN PRINT FROM ASP TO AN DEFAULT PRINTER WHICH IS INSTALLED .


THANKS
YOGESH [sig][/sig]
 
At the server you mean? [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
 
I mean at the client, he is having an default network printer attached to his local machine , suppose he wants to take the print of the list what i am displaying then how it should go ? ,

In the list i am having print button , it should not asked for the printer , instead of that it should go directly to the printer.

I thing it will makes a sense

Thanks
yogesh



[sig][/sig]
 
That's strictly a Client/Browser issue, not an ASP Issue, since ASP is serverside it shouldnt be any different from any other page you try to print, do the same for some normal HTML, I bet you'll get the same result, try printing from other browsers or machines. It's a Client-side issue, unless you are using some kind of Javascript or something to initiate the print, but if you are just clicking the Print Button on the browser, you need to set up your client for a default printer. [sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]
 
For printing a page please use the following Java Script function.


<HTML>
<script language=javascript>
function printPage()
{
window.print();
}
</script>
<BODY>
<FORM NAME=FRM1>
<INPUT TYPE=BUTTON NAME=PRINTBUTTON ONCLICK=&quot;printPage();&quot;>
</FORM>
</BODY>
</HTML> [sig][/sig]
 
How do you hide the button though when the printing has been selected... is there a line of code that can hide the button once print has been selected?

Cheers...
 
There is a hidden property of form elements that you can set using styles...

I'm not sure you could do it without reloading the page, though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top