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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. how to print the webform

how to print the webform

Scheduled Pinned Locked Moved .NET (Core and Framework)
questioncsharpasp-netdesigntutorial
4 Posts 3 Posters 1 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.
  • A Offline
    A Offline
    an_wingel
    wrote on last edited by
    #1

    i made a webform in asp.net and i want to print that web form design by clicking the button in the webfrom.anybody know how can i do it? thank you so much

    L 1 Reply Last reply
    0
    • A an_wingel

      i made a webform in asp.net and i want to print that web form design by clicking the button in the webfrom.anybody know how can i do it? thank you so much

      L Offline
      L Offline
      Lexa1983
      wrote on last edited by
      #2

      Sure you can print it! :) Attach to button this client script "window.print()" it's all you need to do. Also you can put two functions on your page function window.onbeforeprint() { //Make you changes before printing, like //hiding unnecessary while printing elements } and function window.onafterprint() { //Restore previous state after printing }

      A 1 Reply Last reply
      0
      • L Lexa1983

        Sure you can print it! :) Attach to button this client script "window.print()" it's all you need to do. Also you can put two functions on your page function window.onbeforeprint() { //Make you changes before printing, like //hiding unnecessary while printing elements } and function window.onafterprint() { //Restore previous state after printing }

        A Offline
        A Offline
        an_wingel
        wrote on last edited by
        #3

        IS it for visual basic ,asp.net webform?

        G 1 Reply Last reply
        0
        • A an_wingel

          IS it for visual basic ,asp.net webform?

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          No, it's Javascript. If you would use ASP.NET to print anything, it would be printed on a printer connected to the server. --- b { font-weight: normal; }

          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