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. Printing TextBox

Printing TextBox

Scheduled Pinned Locked Moved ASP.NET
html
4 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.
  • D Offline
    D Offline
    Dirso
    wrote on last edited by
    #1

    Hi, I have a TextBox and a Button in my page. I'd like to print only the textBox content when the user clicks the button, the browser print dialog may show, i don't really care, the only thing important to me is not sending the standard html printed header nor the footer with the page url. I just want the textbox content printed, it can't be changed by the browser, nor having anything added to. Thanks, Dirso

    C 1 Reply Last reply
    0
    • D Dirso

      Hi, I have a TextBox and a Button in my page. I'd like to print only the textBox content when the user clicks the button, the browser print dialog may show, i don't really care, the only thing important to me is not sending the standard html printed header nor the footer with the page url. I just want the textbox content printed, it can't be changed by the browser, nor having anything added to. Thanks, Dirso

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      The only way you can do this, is to show a new window with the text you want to print, and then print that.

      Christian Graus Driven to the arms of OSX by Vista.

      D 1 Reply Last reply
      0
      • C Christian Graus

        The only way you can do this, is to show a new window with the text you want to print, and then print that.

        Christian Graus Driven to the arms of OSX by Vista.

        D Offline
        D Offline
        Dirso
        wrote on last edited by
        #3

        That would be ok for me, my problem is that when I print any internet document, it usually has it's own format, like it has the internet page header and a footer with the url right? I know it depends on the browser the customer is using but I have to print ONLY the text I'm showing, nothing more. I'm actually constructor printer commands, so any characters or symbols the browser "decides" to print other than what I tell would generate printer errors.

        C 1 Reply Last reply
        0
        • D Dirso

          That would be ok for me, my problem is that when I print any internet document, it usually has it's own format, like it has the internet page header and a footer with the url right? I know it depends on the browser the customer is using but I have to print ONLY the text I'm showing, nothing more. I'm actually constructor printer commands, so any characters or symbols the browser "decides" to print other than what I tell would generate printer errors.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          You get NO control. The end. The browser prints, and that's it. Not unless yo uwrite an activeX control or something. But, if it prints a title, it's bound to be the document title, so make that blank. Go to a site like expedia or your bank. They will give you a print view. Look at the HTML to see how they construct it to print the way it does.

          Christian Graus Driven to the arms of OSX by Vista.

          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