views:

370

answers:

1

I have a problem trying to download filenames with a semicolon in them in IE8.

Response.AddHeader("Content-Disposition", "attachment; filename=\"" + attachment.File.FileName + "\"");

Assuming that attachment.File.FileName = "Test;Test;Test.txt"

FF 3.5: It prompts you to save/open the file with the name "Test;Test;Test.txt". This is the desired result.

IE8: It prompts you to save/open the file with the name "Test".

I need to figure out how to get the desired result in IE8.

A: 

Did you made a test using the escape sequence for ; (%3B) ?

Response.AddHeader("Content-Disposition", "attachment; filename=\"file%3Bfile%3B.txt\"");
Rodrigo