Download file through asp...Help

Results 1 to 3 of 3

Thread: Download file through asp...Help

  1. #1
    Shumaila Guest

    Default Download file through asp...Help

    Hello, <BR>I am using following code for downloading the result produced by an asp page on user machine as .csv file (Comma Separated Value file). When user click on the link to this asp file a dialog box opens asking &#039;Save it to hard disk&#039; or &#039;Open from current location&#039;. The Standard IE Download dialog box. Now when i click on open it, dialog box open again asking me same two options again, then i have to click on open it again to opent the file. (i.e., i have to see that dialog box twice, whereas it should appear only once). <BR>Does it has to do any thing with server setting? <BR>Is it some thing with Code? <BR>Do i have to do some thing with Server extension. (I have even tried creating extension for csv mime-type) <BR>please help <BR>or suggest some alternative as what should i do to download the results from asp file on client machine. <BR><BR><BR>&#060;%@ LANGUAGE = VBScript %&#062; <BR><BR>&#060;% <BR>Response.Expires =0 <BR>Response.Buffer = False <BR>Response.ContentType = "text/sidg-csv" <BR>Response.AddHeader "Content-Disposition", "attachment; filename=DownloadCSV.csv" <BR>Server.ScriptTimeout = 6000 <BR><BR>Response.Write "You are view a Comma separated file" <BR>%&#062; <BR>

  2. #2
    Join Date
    Dec 1969

    Default anyone??

    as far as i know it definitely has to do something with the settings, but i dont know how to avoid that.

  3. #3
    Join Date
    Dec 1969

    Default RE: anyone??

    1. double check that that&#039;s the correct mime type<BR>2. take all extra white space out from outside the delimiters - it&#039;ll be sent to the client<BR>3. turn buffering on - that would also cure #2<BR><BR><BR>j

Posting Permissions

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