S
scorpion53061
Hi I am actually a vb.net windows developer using code to write a web page.
I have a loop that writes rows to the web page. What I would like to do is:
1. Every five tables force a page break
OR
2. If a table is broken between pages it should force a pagebreak to make
the table appear on the next page.
Can this be done in HTML? thank you for any help.........
A sample of how it is looking in my project....drs is a variable for row ,
Dshistory1.Tables is the table of data to be written, i is the integer
indicating what row you are on, sw is the data.
For Each drs In Dshistory1.Tables(0).Rows
i = i + 1
sw.WriteLine("<html>")
sw.WriteLine("<body>")
sw.WriteLine("<table border=3 cellspacing=1 width=100% id=AutoNumber1>")
sw.WriteLine("<tr>")
sw.WriteLine("<td width=33% align=center><b>CUSTNO</b></td>")
sw.WriteLine("<td width=33% align=center><b>CUSTNAME</b></td>")
sw.WriteLine("<td width=34% align=center><b>SLSMNO</b></td>")
sw.WriteLine("</tr>")
sw.WriteLine("<tr>")
sw.WriteLine("<td width=33% align=center>" &
Dshistory1.Tables(0).Rows(i).Item("CUSTNO") & "</td>")
sw.WriteLine("<td width=33% align=center>" &
Dshistory1.Tables(0).Rows(i).Item("CUSTNAME") & "</td>")
sw.WriteLine("<td width=34% align=center>" &
Dshistory1.Tables(0).Rows(i).Item("SLSMN") & "</td>")
sw.WriteLine("</tr>")
sw.WriteLine("</table>")
sw.WriteLine("</center>")
sw.WriteLine("</div>")
Next
sw.WriteLine("</body>")
sw.WriteLine("</html>")
sw.Close()
I have a loop that writes rows to the web page. What I would like to do is:
1. Every five tables force a page break
OR
2. If a table is broken between pages it should force a pagebreak to make
the table appear on the next page.
Can this be done in HTML? thank you for any help.........
A sample of how it is looking in my project....drs is a variable for row ,
Dshistory1.Tables is the table of data to be written, i is the integer
indicating what row you are on, sw is the data.
For Each drs In Dshistory1.Tables(0).Rows
i = i + 1
sw.WriteLine("<html>")
sw.WriteLine("<body>")
sw.WriteLine("<table border=3 cellspacing=1 width=100% id=AutoNumber1>")
sw.WriteLine("<tr>")
sw.WriteLine("<td width=33% align=center><b>CUSTNO</b></td>")
sw.WriteLine("<td width=33% align=center><b>CUSTNAME</b></td>")
sw.WriteLine("<td width=34% align=center><b>SLSMNO</b></td>")
sw.WriteLine("</tr>")
sw.WriteLine("<tr>")
sw.WriteLine("<td width=33% align=center>" &
Dshistory1.Tables(0).Rows(i).Item("CUSTNO") & "</td>")
sw.WriteLine("<td width=33% align=center>" &
Dshistory1.Tables(0).Rows(i).Item("CUSTNAME") & "</td>")
sw.WriteLine("<td width=34% align=center>" &
Dshistory1.Tables(0).Rows(i).Item("SLSMN") & "</td>")
sw.WriteLine("</tr>")
sw.WriteLine("</table>")
sw.WriteLine("</center>")
sw.WriteLine("</div>")
Next
sw.WriteLine("</body>")
sw.WriteLine("</html>")
sw.Close()