Hi...
Can anyone tell me how to make a printer-friendly page using asp and html... how does the browser know what size paper the user will use... it needs to be printable in both the US (letter paper) and standard A4...
IF lineno >= 60
lineno = 0
%>
<!--
INSERT A TABLE COLUMN WITH A PRINTER PAGE BREAK
-->
<tr style="page-break-after:always;">
<td width="100%"></td>
</tr>
<%
END IF
%>
<tr>
<td width="100%"><%=RsInfo%></td>
</tr>
<%
lineno = lineno + 1
Rs.MoveNext
WEND
%>
This would force a printer page break every 60 records. You can play around with the numbers to get your desired result. The key is in the style="page-break-after:always;" attribute which we place inside the <tr> tag but I've seen people create classes and reference those inside <p> tags, etc... You can go to the HTML-CSS forum and search for "page break" to get more details.
Note: As far as I know, the style attribute only works on IE 4 or greater and you may have trouble with Netscape.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.