|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Print PageASP.NET 1.1
Does anyone has an example where user can click on an link or button and print the current page? Thanks Peter 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.1Does anyone has an example where user can click on an link or button and print the current page? Thanks Peter 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> microsoft.public.dotnet.framework.aspnet:364152| 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 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet "javascript:window.print()" to use the browser's print function.| | You can simply put a "print" button/link with the script | Hope that helps and print the current page?| 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 Show quoteHide quote | Thanks | Peter |
Show quote
Hide quote
"Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message Thank You very much, this is what I needednews: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 > | > 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> <OTYH1Cu$FHA.2***@TK2MSFTNGP12.phx.gbl> | References: <OSNnvht$FHA.***@TK2MSFTNGP11.phx.gbl> <KjdI9cx$FHA.***@TK2MSFTNGXA02.phx.gbl> | Subject: Re: Print Page microsoft.public.dotnet.framework.aspnet:364208| 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 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 | | |
Other interesting topics
Exceptions kill Sessions?
total newbie question about Listbox.selectedindex Call WebService using HTTPWebRequest object Role based security Problems with IIS 5.1 & Oracle9i Scalable web architecture with ASP.NET 2.0 Store temporary data? ImageMap Coordinate Question asp treeview Publish website problem in ASP.NET 2.0 / VS 2005 |
|||||||||||||||||||||||