ãã¡ã¤ã«ããã¦ã³ãã¼ããã ASP.NET Web ãã¼ã¸ã§æ¥æ¬èªãã¡ã¤ã«åãæååããã
èãããã®ã§,åé¿çãä¼ããã
ASP.NET 1.0, 1.1 ã Internet Explorer ã®è¨å®ã§ã¯ããããã®ç¾è±¡ãåé¿ãããã¨ã¯ã§ãã¾ããããã¡ã¤ã«åã«ä½¿ç¨ããæåããæ¤è¨ãã ããã ãªããASP.NET Web ã¢ããªã±ã¼ã·ã§ã³ã«ã¦ Content-Disposition ãå«ã HTTP ãããã¼ã§æ¥æ¬èªæååã使ç¨ããå ´åã¯ãä¸è¨ã®ããã« URLEncode ãããã¨ã§ãããç¨åº¦ã®åé¡ãåé¿ãããã¨ãã§ãã¾ãã
ãã®ãµã³ãã«ã³ã¼ãã£ã¦
Response.AppendHeader("Content-Disposition","attachment; filename=" & HttpUtility.UrlEncode("æ¥æ¬èª") & ".txt")
ãæ£è§£ãªãã ããã
ãããªæãã§ä½¿ãã¨è¯ããã
Dim ShiftJisEncode As System.Text.Encoding = System.Text.Encoding.GetEncoding("Shift-JIS") Response.AppendHeader("Content-Disposition", _ "attachment; filename=" & HttpUtility.UrlEncode("ä¾¡æ ¼ãªã¹ã_20090301") & ".txt") Response.ContentType = "application/octet-stream" Response.BinaryWrite(ShiftJisEncode.GetBytes("åå,ä¾¡æ ¼")) Response.BinaryWrite(ShiftJisEncode.GetBytes("ASUKA YAMATO SH,12800JPY")) Response.End()