I have htmltable which dynamically generated. I want to print this table. which consist lot of pages. when I used window.print() its printing into 7, 8 pages. but my problem is I need Header and footer on each page (A4 size). how can Set header and footer to each page.
I am using asp.net with C#.

I put header and footer on .aspx page but problem is that data is binding dynamic when I print then print goes multiple pages (ie 4 or 5 pages depend on data). So header come on first page and footer on last page I need header and footer on each page

Please provide me any suggestion or alternate way to do this task.

Recommended Answers

All 2 Replies

Instead of this you can go for Crystal Reports or (SSRS)RDL Reports .

If you use the <thead> and <tfoot> elements for your header and footer, you can use

thead {display: table-header-group; }

tfoot {display: table-footer-group; }


to force the browser to print them on every page.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.