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. Hiding the buttons When Print Button is clicked........

Hiding the buttons When Print Button is clicked........

Scheduled Pinned Locked Moved ASP.NET
4 Posts 3 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.
  • M Offline
    M Offline
    mcmilan
    wrote on last edited by
    #1

    Hi, I am using Pring Button in my webpage...... when I click the print button In my print out it is printing buttons also. My requirement is I don't want to print the buttons on paper. finally I want to hide the buttons when I click the print option. Thanking you Mcmilan.

    M L 2 Replies Last reply
    0
    • M mcmilan

      Hi, I am using Pring Button in my webpage...... when I click the print button In my print out it is printing buttons also. My requirement is I don't want to print the buttons on paper. finally I want to hide the buttons when I click the print option. Thanking you Mcmilan.

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

      Use a css style set for the print media mode. Something like this: .css file:

      @media print {
      .hideOnPrint { display: none;}
      }

      .aspx file:

      <asp:Button id="..." runat="server" CssClass="hideOnPrint" ... />

      Here's a couple of links to more information: http://www.w3.org/TR/CSS21/media.html[^] http://www.javascriptkit.com/dhtmltutors/cssmedia.shtml[^]

      M 1 Reply Last reply
      0
      • M mcmilan

        Hi, I am using Pring Button in my webpage...... when I click the print button In my print out it is printing buttons also. My requirement is I don't want to print the buttons on paper. finally I want to hide the buttons when I click the print option. Thanking you Mcmilan.

        L Offline
        L Offline
        leoinfo
        wrote on last edited by
        #3

        mcmilan wrote:

        finally I want to hide the buttons when I click the print option.

        That's a good idea!

        Please... SAVE my time by rating the posts that you read!


        There are 10 kinds of people in the world: those who understand binary and those who don't.

        1 Reply Last reply
        0
        • M Mike Ellison

          Use a css style set for the print media mode. Something like this: .css file:

          @media print {
          .hideOnPrint { display: none;}
          }

          .aspx file:

          <asp:Button id="..." runat="server" CssClass="hideOnPrint" ... />

          Here's a couple of links to more information: http://www.w3.org/TR/CSS21/media.html[^] http://www.javascriptkit.com/dhtmltutors/cssmedia.shtml[^]

          M Offline
          M Offline
          mcmilan
          wrote on last edited by
          #4

          Thank you very much for your help. From McMilan.

          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