Force document download

Results 1 to 2 of 2

Thread: Force document download

  1. #1
    Join Date
    Dec 1969

    Default Force document download

    I want to force a document to download when a link is clicked instead of the document opening in the browser? I&#039;m using a page with the following code (e.g. for excel worksheets):<BR><BR>response.ContentType="applicat ion/"<BR>response.AddHeader "content-disposition","attachment; filename=filename.xls" <BR>server.execute(strPath & "filename.xls")<BR>response.End() <BR><BR>This works, but opens two save dialog boxeswhich obviously does not look profesional.<BR><BR>Is there another way to do this?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Server.Execute?

    I&#039;ve never seen it done that way, and that may be your problem.<BR><BR>Investigate the ADODB.Stream object to stream the binary data back to the client.<BR><BR>Craig.

Posting Permissions

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