Sometimes when you load your file, the filename might include some special character. Look at the code below:
HttpContext.Current.Response.AddHeader("content-disposition", string.Format("attachment; filename=" + HttpUtility.UrlEncode(filenameArry[0], System.Text.Encoding.UTF8)));
When the system try to load the file with special character in the filename (like &, ;, etc) then there will be problem while reading it. You have to append the following to avoid the problem:
HttpUtility.UrlEncode(filename)
HttpUtility.Encode can solve the problem.
Enjoy.
2009/10/06
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment