Download files to the client from the server.

xiaoxiao2021-03-06  40

FileInfo Fi = New FileInfo (Ls_Path3);

Response.clear ();

Response.clearheaders ();

Response.buffer = false;

Response.Appendheader ("Content-Disposition", "Attachment; FileName =" System.Web.httputility.urlencode (System.Text.Encoding.utf8.getbytes));

Response.Appendheader ("Content-length", FI.LENGTH.TOSTRING ());

Response.contenttype = "Application / OcTet-stream";

Response.writefile (LS_PATH3);

Response.flush ();

Response.end ();

About ASP.NET Chinese file name long download problem

转载请注明原文地址:https://www.9cbs.com/read-70292.html

New Post(0)