Splitting the contents of a page on 2 printed pages
-
Hi there. I made an app that displays string, lines and stuff (the code is in Page_Load). I need a way to make sure that part of what is on the asp.net page gets printed on one page and part on another page. I thought that could be achieved by locating what I need way down with a high y value (above 1300) but it didn´t work. Then I tried saving the image on the hard drive and then print out but it didn´t work either, all still get´s printed out on one page (the first). How can I control what goes on the first page and what on the second page when the contents of my page get printed out on a printer of a user that visits my page? F
-
Hi there. I made an app that displays string, lines and stuff (the code is in Page_Load). I need a way to make sure that part of what is on the asp.net page gets printed on one page and part on another page. I thought that could be achieved by locating what I need way down with a high y value (above 1300) but it didn´t work. Then I tried saving the image on the hard drive and then print out but it didn´t work either, all still get´s printed out on one page (the first). How can I control what goes on the first page and what on the second page when the contents of my page get printed out on a printer of a user that visits my page? F
One strategy would be to use the CSS style attribute
page-break-before: always;
. Here's an example of what I mean:<html>
<head>
<title> Page Breaks with CSS </title>
</head><body>
<form runat="server">
<p>This text should print on the first page</p>
<p style="page-break-before: always;">
This Text should print on the second page
</p>
</form>
</body></html>