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. C#
  4. Send File As Download After Complete? [modified]

Send File As Download After Complete? [modified]

Scheduled Pinned Locked Moved C#
csharpquestionasp-netsysadminhelp
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.
  • A Offline
    A Offline
    Arcdigital
    wrote on last edited by
    #1

    Hey, I was wondering how I can send a file download after my class is complete. I have a C# + ASP.NET site. I have a Button1_Click class. When that is run it copies some files, does some things and eventually creates a zip file. How do I send that zip file to the user as a download? E.G. I want it to 1) User clicks button 2) Server does what it needs to do 3) User gets a file download popup with the zip file that was created in step 2. All I need help with is #3. Thanks!!, Anand P.S. I've looked into Response.BinaryWrite but I'm not sure if that is it.

    modified on Saturday, September 13, 2008 9:41 PM

    A 1 Reply Last reply
    0
    • A Arcdigital

      Hey, I was wondering how I can send a file download after my class is complete. I have a C# + ASP.NET site. I have a Button1_Click class. When that is run it copies some files, does some things and eventually creates a zip file. How do I send that zip file to the user as a download? E.G. I want it to 1) User clicks button 2) Server does what it needs to do 3) User gets a file download popup with the zip file that was created in step 2. All I need help with is #3. Thanks!!, Anand P.S. I've looked into Response.BinaryWrite but I'm not sure if that is it.

      modified on Saturday, September 13, 2008 9:41 PM

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      Hey now, we have a whole ASP .NET forum y'know. But, from that one time when I used asp .net about 3 years ago, I think you can just use Response.Redirect, the web browser should recognise that its a file and not a web page, and start a download.

      My current favourite word is: Nipple!

      -SK Genius

      Game Programming articles start -here[^]-

      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