Page break in ASP pages

G

Guest

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

Akshay.
 
G

Guest

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>
 
G

Guest

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.
 
D

deftone

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.
 
D

deftone

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top