Page break in ASP pages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can we set page breaks in ASP Pages dynamically based on the data being
populated?

Akshay.
 
Yes, Page break for printing.

Akshay.






- Show quoted text -

<html>
<head>
<title>Print</title>
<style type="text/css">
..break { page-break-before: always; }
</style>
</head>
test1
<br class="break">
test2
</body>
</html>
 
How will this dynamically manage the data in one page and shift the extra one
to the other page?

How will this code understand that it has to page break and where??

If there is a table, how will it know to show one row / column on one page
and if its spilling or cutting, to take the full row / column on the next
page??

Can this code manage this dynamism?If not how to manage - pls guide.

Regards,
Akshay.
 
What he gave you was the CSS code to force a page break while
printing. It would be up to you to insert the code into your own.

1. put the css code into your page or seperate style css file.
<style type="text/css">
.break { page-break-before: always; }
</style>

2. Write your code which will determine when a new page is needed, and
when it is, insert a <div class="break"></div>. If you are dealing
with tables, you may need to close the table at the bottom of the
page, before the <div class="break"></div>, then restart the table
after the div. I am not sure how it will handle a <tr class="break">
or something like that.

I would say this is the best answer for your question, which is
somewhat ambiguous.
 
What he gave you was the CSS code to force a page break while
printing. It would be up to you to insert the code into your own.

1. put the css code into your page or seperate style css file.
<style type="text/css">
.break { page-break-before: always; }
</style>

2. Write your code which will determine when a new page is needed, and
when it is, insert a <div class="break"></div>. If you are dealing
with tables, you may need to close the table at the bottom of the
page, before the <div class="break"></div>, then restart the table
after the div. I am not sure how it will handle a <tr class="break">
or something like that.

I would say this is the best answer for your question, which is
somewhat ambiguous.
 
Back
Top