Home All Groups Group Topic Archive Search About
Author
12 Dec 2005 4:54 AM
Peter
ASP.NET 1.1
Does anyone has an example where user can click on an link or button and print the current page?


Thanks


Peter

Author
12 Dec 2005 5:55 AM
Patrick.O.Ige
You can simply put a "print" button/link with the script "javascript:window.print()" to use the browser's print function.
Hope that helps
Patrick

  "Peter" <pczurak@online.nospam> wrote in message news:OSNnvht$FHA.912@TK2MSFTNGP11.phx.gbl...
  ASP.NET 1.1
  Does anyone has an example where user can click on an link or button and print the current page?


  Thanks


  Peter
Are all your drivers up to date? click for free checkup

Author
12 Dec 2005 12:26 PM
Steven Cheng[MSFT]
Hi Peter,

I think you can just use the javascript  "window.print()" as Patrick has
mentioned, if you're wondering how to make it bind with a html button's
click event, just use the following html code which bind the printing
script with the html button's click client event:

<html>
.....

<input type="button" value="print page" 
onclick="javascript:window.print();"  />

</html>

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
Show quoteHide quote
| From: "Patrick.O.Ige" <naijaco***@hotmail.com>
| References: <OSNnvht$FHA.***@TK2MSFTNGP11.phx.gbl>
| Subject: Re: Print Page
| Date: Mon, 12 Dec 2005 16:55:47 +1100
| Lines: 65
| MIME-Version: 1.0
| Content-Type: multipart/alternative;
|     boundary="----=_NextPart_000_011A_01C5FF3C.E6E95860"
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| Message-ID: <OTYH1Cu$FHA.2***@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 203.36.211.134
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:364152
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| You can simply put a "print" button/link with the script
"javascript:window.print()" to use the browser's print function.
| Hope that helps
| Patrick
|   "Peter" <pczurak@online.nospam> wrote in message
news:OSNnvht$FHA.912@TK2MSFTNGP11.phx.gbl...
|   ASP.NET 1.1
|   Does anyone has an example where user can click on an link or button
and print the current page?
Show quoteHide quote
|   Thanks
|   Peter
|
Author
12 Dec 2005 1:46 PM
Peter
Show quote Hide quote
"Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message
news:KjdI9cx$FHA.552@TK2MSFTNGXA02.phx.gbl...
> Hi Peter,
>
> I think you can just use the javascript  "window.print()" as Patrick has
> mentioned, if you're wondering how to make it bind with a html button's
> click event, just use the following html code which bind the printing
> script with the html button's click client event:
>
> <html>
> ....
>
> <input type="button" value="print page"
> onclick="javascript:window.print();"  />
>
> </html>
>
> Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
> --------------------
> | From: "Patrick.O.Ige" <naijaco***@hotmail.com>
> | References: <OSNnvht$FHA.***@TK2MSFTNGP11.phx.gbl>
> | Subject: Re: Print Page
> | Date: Mon, 12 Dec 2005 16:55:47 +1100
> | Lines: 65
> | MIME-Version: 1.0
> | Content-Type: multipart/alternative;
> | boundary="----=_NextPart_000_011A_01C5FF3C.E6E95860"
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> | Message-ID: <OTYH1Cu$FHA.2***@TK2MSFTNGP12.phx.gbl>
> | Newsgroups: microsoft.public.dotnet.framework.aspnet
> | NNTP-Posting-Host: 203.36.211.134
> | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
> | Xref: TK2MSFTNGXA02.phx.gbl
> microsoft.public.dotnet.framework.aspnet:364152
> | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> |
> | You can simply put a "print" button/link with the script
> "javascript:window.print()" to use the browser's print function.
> | Hope that helps
> | Patrick
> |   "Peter" <pczurak@online.nospam> wrote in message
> news:OSNnvht$FHA.912@TK2MSFTNGP11.phx.gbl...
> |   ASP.NET 1.1
> |   Does anyone has an example where user can click on an link or button
> and print the current page?
> |   Thanks
> |   Peter
> |
>

Thank You very much, this is what I needed
Author
12 Dec 2005 4:07 PM
Steven Cheng[MSFT]
You're welcome. :-)

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Peter" <pczurak@online.nospam>
| References: <OSNnvht$FHA.***@TK2MSFTNGP11.phx.gbl>
<OTYH1Cu$FHA.2***@TK2MSFTNGP12.phx.gbl>
<KjdI9cx$FHA.***@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Print Page
| Date: Mon, 12 Dec 2005 07:46:59 -0600
| Lines: 64
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#kGUNLy$FHA.4***@TK2MSFTNGP14.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: cpe-69-23-74-9.new.res.rr.com 69.23.74.9
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:364208
Show quoteHide quote
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message
| news:KjdI9cx$FHA.552@TK2MSFTNGXA02.phx.gbl...
| > Hi Peter,
| >
| > I think you can just use the javascript  "window.print()" as Patrick has
| > mentioned, if you're wondering how to make it bind with a html button's
| > click event, just use the following html code which bind the printing
| > script with the html button's click client event:
| >
| > <html>
| > ....
| >
| > <input type="button" value="print page"
| > onclick="javascript:window.print();"  />
| >
| > </html>
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "Patrick.O.Ige" <naijaco***@hotmail.com>
| > | References: <OSNnvht$FHA.***@TK2MSFTNGP11.phx.gbl>
| > | Subject: Re: Print Page
| > | Date: Mon, 12 Dec 2005 16:55:47 +1100
| > | Lines: 65
| > | MIME-Version: 1.0
| > | Content-Type: multipart/alternative;
| > | boundary="----=_NextPart_000_011A_01C5FF3C.E6E95860"
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| > | Message-ID: <OTYH1Cu$FHA.2***@TK2MSFTNGP12.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 203.36.211.134
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:364152
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | You can simply put a "print" button/link with the script
| > "javascript:window.print()" to use the browser's print function.
| > | Hope that helps
| > | Patrick
| > |   "Peter" <pczurak@online.nospam> wrote in message
| > news:OSNnvht$FHA.912@TK2MSFTNGP11.phx.gbl...
| > |   ASP.NET 1.1
| > |   Does anyone has an example where user can click on an link or button
| > and print the current page?
| > |   Thanks
| > |   Peter
| > |
| >
|
| Thank You very much, this is what I needed
|
|
|

Bookmark and Share