Results 1 to 2 of 2

Thread: Downloading

  1. #1
    Join Date
    Dec 1969

    Default Downloading

    i have a text file for example sample.txt. i want to save give a provision to the client to save in his local machine. if i give in the &#060;a&#062;(html) tag the file is opening in the same page. but it should not be. please give me a sample coding to how to save a file into the clients&#039; machine.<BR><BR>thanking you

  2. #2
    Join Date
    Dec 1969

    Default RE: Downloading

    Perhaps check out the following:<BR><BR>Force "file download" for known file types<BR><BR>"Suppose you have written an ASP page that contains a link to a known MIME type, but you want the user to download the file instead of viewing it. Add the following to your script:<BR> response.addHeader "content-disposition", "attachment;filename=filename.ext"<BR>Then substitute the actual filename and extension, and it is as good as done. When your users click on the link, they will immediately see the download dialog box instead of the files contents.<BR><BR>HOWTO: Raise a "File Download" Dialog Box for a Known MIME Type<BR><BR>Response.AddHeader "content-disposition","attachment; filename=fname.ext" <BR><BR>Best regards,<BR>-Paul<BR><BR> - Web Database Developer<BR><BR>Developer Tips Page<BR><BR><BR>

Posting Permissions

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