私のアプリでは、ユーザーは自分のファイル (画像、pdf、単語など) をダウンロードできます。HttpHandel を使用して実行します。ファイルの選択とダウンロードを開始します。ユーザーがリストからすべてのファイルをダウンロードできるようにしたいのですが、どうすればよいですか
public void ProcessRequest(HttpContext context) {
HttpResponse response = context.Response;
string cururl = context.Request.Url.ToString();
int iqs = context.Request.Url.ToString().IndexOf('?');
string querystring = (iqs < cururl.Length - 1) ? cururl.Substring(iqs + 1) : String.Empty;
NameValueCollection parameters = HttpUtility.ParseQueryString(querystring);
byte[] result = GetstreamForDownload(parameters);
string fileId = context.Request.QueryString["fileId"];
response.AddHeader("Content-disposition", "attachment; filename=" + GetFileName(parameters));
response.ContentType = "application/octet-stream";
response.BinaryWrite(result);
}