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. How to save webpage to client machine in asp.net

How to save webpage to client machine in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
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.
  • A Offline
    A Offline
    ashutosh_karna
    wrote on last edited by
    #1

    I have a some report messages in a content place holder within a master page in .aspx page. I want to put a "Save Button" on my page, which saves the webpage to user's computer (just like "SaveAs File dialog box" in windows application". Can anybody tell me how do I save a webpage in .txt or .pdf or .doc or .htm format (any of theses) on button click event

    A C 2 Replies Last reply
    0
    • A ashutosh_karna

      I have a some report messages in a content place holder within a master page in .aspx page. I want to put a "Save Button" on my page, which saves the webpage to user's computer (just like "SaveAs File dialog box" in windows application". Can anybody tell me how do I save a webpage in .txt or .pdf or .doc or .htm format (any of theses) on button click event

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      You want to save the page content in client system when user click on save button on you page?

      cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net My Latest Article : IIS Remote Debugging

      A 1 Reply Last reply
      0
      • A Abhijit Jana

        You want to save the page content in client system when user click on save button on you page?

        cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net My Latest Article : IIS Remote Debugging

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

        yes

        1 Reply Last reply
        0
        • A ashutosh_karna

          I have a some report messages in a content place holder within a master page in .aspx page. I want to put a "Save Button" on my page, which saves the webpage to user's computer (just like "SaveAs File dialog box" in windows application". Can anybody tell me how do I save a webpage in .txt or .pdf or .doc or .htm format (any of theses) on button click event

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

          When they push the button, you render the content of the page to a stream and pass that with a content header to say it's a file. To save as anything other than plain text, requires more work, a third party add in, or the Microsoft tools for office. htm is easy, that's what you were sending in the first place, so you don't need to reformat it at all, just stream it.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          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