Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition hea
Content-Disposition
in asp.net mvc2 i use something like this:
return File( tempFile , "application/octet-stream" , HttpUtility.UrlPathEncode(fileName) );
I guess if you don't use mvc(2) you could just encode the filename using
HttpUtility.UrlPathEncode(fileName)