Printer-Friendly page code

Results 1 to 2 of 2

Thread: Printer-Friendly page code

  1. #1
    Join Date
    Dec 1969

    Default Printer-Friendly page code

    re:<BR><BR>I now have the code for the PrintPage.asp page, but I don&#039;t know how to code the link TO build the printer-friendly page. Neither of these work:<BR><BR> &#060;A HREF="/ASPScripts/PrintPage.asp?"&#062;Print Me&#060;/a&#062;<BR> &#060;A HREF="/ASPScripts/PrintPage.asp?REF="&#062;Print Me&#060;/a&#062;<BR><BR>Thank you for helping with the link portion of this script.

  2. #2
    Join Date
    Dec 1969

    Default Did you read the whole..

    .. article?<BR><BR>From article:<BR>At this point you may be wondering how, exactly, PrintPage.asp knows what page the user wishes to view in a printer-friendly format. This is a great question, and there are two ways of accomplishing this: using the HTTP_REFERER server variable or passing the URL of the article through QueryString. The advantage of using the HTTP_REFERER method is that any HTML or ASP page can have a printer-friendly icon or hyperlink; all that you need to add is the following HTML: <BR><BR>&#060;A HREF="/ASPScripts/PrintPage.asp"&#062;<BR> View a Printer-Friendly Version of this Web Page!<BR>&#060;/A&#062; <BR><BR><BR>Passing the URL through the QueryString, however, requires that each Web page be slightly different, containing its own URL in the QueryString like so: <BR><BR>&#060;A HREF="/ASPScripts/PrintPage.asp?REF=URL_of_Web_Page"&#062;<BR> View a Printer-Friendly Version of this Web Page!<BR>&#060;/A&#062; <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts