Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Splitting the contents of a page on 2 printed pages

Splitting the contents of a page on 2 printed pages

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-net
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    naglbitur
    wrote on last edited by
    #1

    Hi there. I made an app that displays string, lines and stuff (the code is in Page_Load). I need a way to make sure that part of what is on the asp.net page gets printed on one page and part on another page. I thought that could be achieved by locating what I need way down with a high y value (above 1300) but it didn´t work. Then I tried saving the image on the hard drive and then print out but it didn´t work either, all still get´s printed out on one page (the first). How can I control what goes on the first page and what on the second page when the contents of my page get printed out on a printer of a user that visits my page? F

    M 1 Reply Last reply
    0
    • N naglbitur

      Hi there. I made an app that displays string, lines and stuff (the code is in Page_Load). I need a way to make sure that part of what is on the asp.net page gets printed on one page and part on another page. I thought that could be achieved by locating what I need way down with a high y value (above 1300) but it didn´t work. Then I tried saving the image on the hard drive and then print out but it didn´t work either, all still get´s printed out on one page (the first). How can I control what goes on the first page and what on the second page when the contents of my page get printed out on a printer of a user that visits my page? F

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      One strategy would be to use the CSS style attribute page-break-before: always;. Here's an example of what I mean:

      <html>
      <head>
      <title> Page Breaks with CSS </title>
      </head>

      <body>
      <form runat="server">
      <p>This text should print on the first page</p>
      <p style="page-break-before: always;">
      This Text should print on the second page
      </p>
      </form>
      </body>

      </html>

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups