RE: IE7beta2 final bug: "Underscore" on download files

Posted by Divs99 under C# on 9/11/2012 | Points: 10 | Views : 1217 | Status : [Member] | Replies : 0
IE7 ile download replaces spaces with underscore (_)...i did by using below code it was working fine.....my problem is
This workaround fixes the issue with the "Save as" functionality but leads
files to open with %20s in the filenameas when selecting to "Open" file
instead of "Save as".


String userAgent = Request.Headers.Get("User-Agent");
String filename = toDownload.Name;
if (userAgent.Contains("MSIE 7.0"))
filename = toDownload.Name.Replace(" ", "%20");

This workaround fixes the issue with the "Save as" functionality but leads
files to open with %20s in the filenameas when selecting to "Open" file
instead of "Save as".




Responses

(No response found.)

Login to post response