G
Guest
Heya,
I need help creating a download page that should be used to download files
from a server, and the files on the server contains filenames that contains
non-us characters such as the swedish å. ä and ö.
The aspx file should work like this:
download.aspx?file=c:\download\åäö.doc
If I choose to save the file it works ok but if I tries to open it the Word
Application shows a filename in its title bar that is encoded with the
percentage character.
This is a part of the aspx file:
string f = Request.QueryString["name"];
Response.ContentType = "application/x-msdownload";
Response.AddHeader("content-disposition","attachment; filename=" +
Server.UrlPathEncode(f.Substring(f.LastIndexOf('\\')+1,f.Length-
f.LastIndexOf('\\') - 1)));
I hope somebody out there understands my problem and can help me out.
Cheers
I need help creating a download page that should be used to download files
from a server, and the files on the server contains filenames that contains
non-us characters such as the swedish å. ä and ö.
The aspx file should work like this:
download.aspx?file=c:\download\åäö.doc
If I choose to save the file it works ok but if I tries to open it the Word
Application shows a filename in its title bar that is encoded with the
percentage character.
This is a part of the aspx file:
string f = Request.QueryString["name"];
Response.ContentType = "application/x-msdownload";
Response.AddHeader("content-disposition","attachment; filename=" +
Server.UrlPathEncode(f.Substring(f.LastIndexOf('\\')+1,f.Length-
f.LastIndexOf('\\') - 1)));
I hope somebody out there understands my problem and can help me out.
Cheers