Tuesday, 29 November 2011

PRINTER FRIENDLY PAGE

A lot of websites include valuable information that needs to be printed by the user. It could information like a news article, instructions, directions, or anything else. Sometimes you may even want your entire website to be printable. The problem is that when you print your page, the printout is not formatted correctly and all of these extra banners, menus, etc get printed as well. Well this "Printer Friendly Page" is the answer you have been looking for. There are actually a few different ways to accomplish this, here is one of them.

All you have to do is create a page called printerpage.asp and copy the code below:


Printer Friendly Page

<%
DIM view
view=request.querystring("view")
IF view <> "print" THEN
%>




My Website Menu

History

Products

Services
Print this information.

 

?view=print">Printer Friendly Page

<% ELSE %>

Print this information.


?view=view">Return to Regular View

<% END IF %>




The first time you access the page, it will display your banner and menu items. If you click the Printer Friendly Page link, the page will refresh itself with only the text you want printed.

http://www.aspwebpro.com/aspscripts/miscellaneous/printerfriendlypage.asp

No comments:

Post a Comment