Tables and Page Breaks

Discussion in 'HTML' started by scorpion53061, Sep 1, 2003.

  1. 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()
     
    scorpion53061, Sep 1, 2003
    #1
    1. Advertising

  2. scorpion53061 wrote:
    > 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.


    My screen doesn't have any pages!


    Fun aside, you could experiment with the properties for paged media:
    <http://www.w3.org/TR/CSS2/page.html>. Browser support for these
    properties varies wildly, of course.


    Matthias
     
    Matthias Gutfeldt, Sep 1, 2003
    #2
    1. Advertising

  3. LOL touche' you are correct sir.......

    I guess what I am saying is when the user goes to print the page perhaps
    there is a script or style sheet you could help me with (or perhaps plain
    old HTML) that could make it print in such a way that tables are not broken
    in printing or only prints a number of tables per page.


    "Matthias Gutfeldt" <> wrote in message
    news:bivjc9$dct8o$-berlin.de...
    > scorpion53061 wrote:
    > > 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.

    >
    > My screen doesn't have any pages!
    >
    >
    > Fun aside, you could experiment with the properties for paged media:
    > <http://www.w3.org/TR/CSS2/page.html>. Browser support for these
    > properties varies wildly, of course.
    >
    >
    > Matthias
    >
     
    scorpion53061, Sep 1, 2003
    #3
  4. scorpion53061 wrote:

    > Hi I am actually a vb.net windows developer using code to write a web page.


    See alt.html.tags.

    --
    Toby A Inkster BSc (Hons) ARCS | mailto: | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:
    http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
    playing://(nothing)
     
    Toby A Inkster, Sep 1, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mathieu CARTOIXA
    Replies:
    0
    Views:
    1,085
    Mathieu CARTOIXA
    Jul 17, 2003
  2. Joseph  Ferris

    XSL-FO Page Breaks in Nested Tables

    Joseph Ferris, Apr 6, 2005, in forum: XML
    Replies:
    1
    Views:
    1,270
    Joseph Ferris
    Apr 6, 2005
  3. Chris Brat
    Replies:
    5
    Views:
    711
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
  4. AV

    Page Number and Page Breaks

    AV, Oct 28, 2003, in forum: ASP General
    Replies:
    4
    Views:
    154
  5. Orion Forever

    Managing Page Breaks in an ASP Page

    Orion Forever, May 1, 2009, in forum: ASP General
    Replies:
    2
    Views:
    146
    Orion Forever
    May 1, 2009
Loading...

Share This Page