473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Problem with filenames in response.addheader()

Hi experts,
I am giving filename as "clearbenefits.infosys.txt" to
Response.AddHeader as filename parameter. After clicking the download link
filename on dialogbox is showing as "clearbenefits[1].infosys.txt". How can i
avoid this. Can any one help me.
I am using IE6 version, Is this is a explorer problem or coding
problem.

Code:

Dim objReader as new binaryreader(File.Open(filepath,
FileMode.Open))
Response.AddHeader ("Content-Disposition", "attachment;filename=" & name)
Response.ContentType = contentType
Response.BinaryWrite (objReader.readbytes(filesize))
objreader.close()

Thanks for helping.

Nov 19 '05 #1
1 1789
"Incorrect filenames in download link." wrote ...
Hi experts,
I am giving filename as "clearbenefits.infosys.txt" to
Response.AddHeader as filename parameter. After clicking the download link
filename on dialogbox is showing as "clearbenefits[1].infosys.txt".


Normally happens if:

1 - you have more than 1 fullstop in the file name (ie, the extension cannot
be determined)
2 - if you already have a copy of the file in your temporary internet files

I would suggest item one in this case - rename the file - change the first
fullstop to a - or something and see if the problem goes away.

Regards

Rob
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Adam B | last post by:
Hello. I'm writing an aspx page that reads a file from disk and writes the file out through the Response.WriteBinary() method. This allows me to support security and custom reports for various...
0
by: pargat singh | last post by:
Hi Everyone, I have a log file like 123.log and i want to display this log in browser.In ASP page at top i have following. <%Response.Buffer = true;%> <%Response.Expires = -1%> Inside page...
3
by: Spacy | last post by:
Am creating a HTML Report in asp.net. To save this report to excel on client-side, i write this code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition",...
4
by: moondaddy | last post by:
Using vb.net I need to download image files to the client browser where they can save to disk. Below is some sample code I'm using. when I run this the File Download window in the browser says: ...
0
by: PD | last post by:
I am trying to stream out a PDF file via the response object and when I execute the code it always brings up the first document that I pulled up.Even when I step through the code, I can see the new...
6
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the...
1
by: Andyza | last post by:
With reference to the ASPFAQ 2161 article - http://classicasp.aspfaq.com/general/how-do-i-prompt-a-save-as-dialog-for-an-accepted-mime-type.html Does the 'Content-Disposition' code work if the...
3
by: gom | last post by:
I am using the following code to stream a server generated pdf file to a client. Acrobat 7 opens the file as expected but Acrobat 5,6 and 8 launch in memory but never open. I ran the command with...
1
by: spoonybard | last post by:
Hi Everyone, I have a C# ASP.Net 1.1 web application that offers the feature to download the reports that we generate into a PDF file. When the Open/Save As dialog box appears, if you click the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.