text/xml 파일을 생성하고, content-type을 application-download로 설정하고, 클라이언트에 첨부 파일 등을 추가하는 버튼을 만드는 방법이 있습니까? 측면? 내가 원하는 것은 XML 파일을 저장하는 "다운로드"버튼이다."Save as"버튼을 IE에 저장하고 클라이언트 측에 파일 저장
response.StatusCode = 200;
response.ContentEncoding = Encoding.UTF32;
response.AddHeader("content-disposition", "attachment; filename=" + fileName);
response.AddHeader("Content-Transfer-Encoding", "binary");
response.AddHeader("Content-Length", response.ContentEncoding.GetByteCount(xmlString).ToString());
response.ContentType = "application-download";
response.Write(xmlString);
당신은 자바 스크립트 뜻? –
C#으로 ASP.NET이라고 추측합니다. – Carlito
@ JanHančič 예, javascript/jquery – Johan