7
내 ashx response.writees 간단한 텍스트 파일이 반환됩니다. 파일 이름을 변경할 수 있습니까? ashx가 mysite.com/someURL에 있으면 someURL.txt가 아닌 myFileName.txt가 반환됩니다.ashx 파일에서 반환 된 파일의 파일 이름을 설정할 수 있습니까?
내 ashx response.writees 간단한 텍스트 파일이 반환됩니다. 파일 이름을 변경할 수 있습니까? ashx가 mysite.com/someURL에 있으면 someURL.txt가 아닌 myFileName.txt가 반환됩니다.ashx 파일에서 반환 된 파일의 파일 이름을 설정할 수 있습니까?
다운로드 한 파일의 이름을 설정하는 데 머리글과 Response.AddHeader 메서드를 사용할 수 있습니다.
context.Response.AddHeader("Content-Disposition", "attachment; filename=myFileName.txt");