Printer Friendly Page

A lot of websites include valuable information that needs to be printed by the user.  The problem is that when your page is printed, the printout is not formatted correctly and all of the extra banners, menus, etc. get printed as well.  Well the answer is to use a “Printer Friendly Page”.  There are several ways to accomplish this and here is one of them.

To do this, create a page called /PrinterPage.asp and copy the code below:

DIM view
IF view <> "print" THEN

<table width="100%" border="0">
<tr><td><img src="images/mybanner.gif"></td></tr>

<p><strong>My Website Menu</strong><br>

<p>Your content to be printed here.</p>


<a href="<%=request.servervariables("script_name")%>?view=print">Printer Friendly Page</a>

<% else %>

<p>Your content to be printed here.</p>

<a href="<%=request.servervariables("script_name")%>?view=view">Return to Full View</a>

<% end if %>

The first time you view the page, it will display your Banner, Website Menu, and Content to be printed.  When you click the ‘Printer Friendly Page’ link, the page will refresh itself with only the Content to be printed.

< Back to ASP Scripts