Incorrect filenames are being showing in downloading.

G

Guest

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.
 
M

Mark Rae

"Incorrect filenames in download link." <Incorrect filenames in download
(e-mail address removed)> wrote in message
I am using IE6 version, Is this is a explorer problem or coding problem.

Neither - it simply means that there is already a file of that name in the
folder where you are trying to download the new one...
 
G

Guest

Thanks for your response.

It is coming even there is no file with same name.
it is the problem with "DOT"s in filename.If i give more than one dot
it will show [1] for first dot.

How can i avoid this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top