.NET to Download (Dynamically and Abstract)

Results 1 to 2 of 2

Thread: .NET to Download (Dynamically and Abstract)

  1. #1
    Join Date
    Dec 1969

    Default .NET to Download (Dynamically and Abstract)

    I have a web based application that houses important information to users in a database. I would like the users to periodically back-up their information by going to a simple web page that I generate and then saving the page on their hard drive.<BR><BR>I would like to automate this process such that the user clicks a button and can pick a location on his or her hard drive to save the information to. I would like for my asp.net page to generate the page to be saved and then save it on their hard drive and return to me some type of confirmation that it was successful. If possible, I would like for my page to not have to create a physical copy of the web page to save on the server end.<BR><BR>Is this possible? How should I go about doing it? Is there a better approach?<BR><BR>I know it’s possible to upload information to a server using .NET, but this process is more like an dynamic/abstract download with a confirmation.<BR><BR>Please advise.

  2. #2
    Join Date
    Dec 1969

    Default Sure, it's pretty easy.

    If you&#039;re just downloading the output of the page (as it would be seen on the browser), all you have to do is add a Content Disposition HTTP header.<BR><BR>That&#039;ll force the browser to prompt the user to download the page as-if it were a file.<BR><BR>As for the confirmation, you&#039;re out of luck. The browser doesn&#039;t send anything back to the server when a download is complete.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts