Downloading file with “;” or “#” in file name ruins filename

前端 未结 4 1732
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 20:20

I have a file named AttachmentDownload.aspx and inside Page_Load method have such code wich offers to download file. All names work correctly in IE except names which includ

4条回答
  •  天命终不由人
    2020-12-01 21:01

    UrlPathEncode only encodes the "Path" portion of a URL-like formed string, try using Server.UrlEncode or HttpUtility.UrlEncode.

提交回复
热议问题