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.

Re: how do i print HTML table using asp.net. Header and footer on each page... 80 80

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

Re: how do i print HTML table using asp.net. Header and footer on each page... 80 80

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.