ASP.Net download page with non-us characters

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
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top