をこの
感謝を解決するために私を助けてください
try
{
// System.String filename = this.ViewState["ImageName"].ToString();
string fileName = "filename.pdf";
// set the http content type to "APPLICATION/OCTET-STREAM
Response.ContentType = "APPLICATION/OCTET-STREAM";
// initialize the http content-disposition header to
// indicate a file attachment with the default filename
// "myFile.txt"
System.String disHeader = "Attachment; Filename=\"" + fileName +
"\"";
Response.AppendHeader("Content-Disposition", disHeader);
// transfer the file byte-by-byte to the response object
System.IO.FileInfo fileToDownload = new
System.IO.FileInfo(Server.MapPath("~/UserUploads/") + fileName);
Response.Flush();
Response.WriteFile(fileToDownload.FullName);
}
catch (System.Exception ex)
// file IO errors
{
//SupportClass.WriteStackTrace(ex, Console.Error);
throw ex;
}
}
ですCheck this for more details
「not working」という概念を定義できますか?何か誤りがありますか?何が起こるのですか? –
私のマシン_ _ –
エラーは発生していません。 page jst post backing .. thatsすべて –